-
Notifications
You must be signed in to change notification settings - Fork 950
coda-q: tabbed UI #13723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: distro/collabora/coda-25.04
Are you sure you want to change the base?
coda-q: tabbed UI #13723
Conversation
c2cf130 to
64a2162
Compare
64a2162 to
d68c2e1
Compare
d68c2e1 to
0c009ee
Compare
|
@Quwex @mmeeks I've updated this branch a bit. I've added a "Gather windows" action to the various view menus and ribbon bar that gathers all tab widgets into one primary window. It should only be "active" when there are multiple documents open but in practice the menu item looks like it's always there. This works better than trying to drag the tabs back onto the tab bar area of other windows. I'll look into dropping on the whole window next, that should be doable, but wasn't working when I tried it last. Maybe something in the WebengineView is causing a problem there. |
stbergmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a quick first round of comments of what I noticed so far.
When I run qt/coda-qt,
- and select "New - Blank Document" it just exits;
- and "Open" and select one existing document, it opens two windows each containing that document;
- and "Open" and multi-select two different documents, they are opened into different windows, not into multiple tabs (and one of them is opened in two windows again)
0c009ee to
4cb75ed
Compare
Yep, I fixed the first one, working on the second one, but am getting a segfault that this laptop is somehow struggling to open. I'll note here when the branch is ready. I've fixed most of the noted items but opening multiple documents is still a bit wrong. Hoping to get it all working well by end of day though. |
c5ecaf7 to
708d18d
Compare
|
@stbergmann ok, I think I've addressed all the points you raised. Opening a new document and files all working as expected now. The double loading was from a merge conflict I mistakenly took duplicate code from. Anyway, give it a shot I think this is ready. |
stbergmann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing I notice is that now we keep the small size of the initial "Collabora Office - Start" window and open new/existing documents in that small window size, instead of switching to a full-screen document window after showing the initial start window.
(Also, I'm not sure whether we'll want to squash these ten commits when merging, or keep them. The first nine seem like a nice logical sequence that could be left as such, while the last "CODA-Q: Fix a few bugs in tabbed ui" is a bit of an outlier that might want to be merged into the respective commits it fixes? I'll leave the decision up to you.)
qt/DetachableTabs.cpp
Outdated
| #include <QTimer> | ||
| #include <QUuid> | ||
|
|
||
| // (Temporary debug helper removed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this looks like a leftover comment that should be removed?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
I fixed documents opening in the smaller starter screen just now. Added that fix to my last commit and removed that comment. I'm fine with squashing the whole branch to merge. If needed I can go through the exercise of splitting that last commit into the other relevant commits that they apply to, but squashing is fine with me and quicker/easier.
36e214d to
60cdc46
Compare
|
Hi @jpwhiting testing the implementation, on GNOME there seems to be a few pixels width frame around the document at all times. That is more visible when Collabora Desktop is on dark mode. Would it be possible to have the tabs in general to react to the current theme of Collabora Desktop and maybe use the same colors?
|
|
Also Ctrl+W closes all the open tabs instead of the current one. |
Thanks for the feedback. That's interesting. I usually run plasma so didn't see that. I've just rebased my branch and changed ctrl-w to close only the current tab. I'll look into stlying the white line/border next and/or just removing that. |
Yep, fixed that just now, ctrl-w only closes the current tab now, pushing the changes one moment. |
60cdc46 to
2bb424c
Compare
|
@Quwex ok, I've removed the line around the window with a Qt stylesheet. It looks fine to me on GNOME now, but I don't use that much. let me know if I missed anything. (I'm not even sure how to choose a different desktop theme there, etc.) |
Yes the frame/line seems to be gone, thanks @jpwhiting! To note, the tab styling still does not align with the system color scheme in GNOME (dark mode as seen in the title bar) nor with Collabora Desktop's dark mode styling. Testing Ctrl+W, the behaviour seems to be unchanged here. When trying to close a tab, whole window ends up closing. |
When a new document is opened, open in a new tab instead of a separate window. Adds a + button which invokes the new document dialog. When the last tab is closed the application quits. Show * when a file is modified. When closing a tab if the file is modified ask user to save, cancel, or discard. Also make tabs movable. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: Iff748106caaf81253cfa6a6901e065d11396b716
When a tab is dragged away create a new QMainWindow to hold the tab. Use a helper function to create the + button on all QTabWidgets. TODO: Implement merging tabs back into the same window via drag and drop or menu actions. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: Ide6479f9d26feae521e6a2676fbf8efeee200850
Dragging a tab from one window can be dropped on another window and it combines them back together. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: I0594feaffd835c8d15b10546b7442c18fcb9f95d
Instead of showing a functional but ugly "New Document" dialog when + button is clicked. Open the backstage view. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: I16f3d542f702059957764f4061d72097073e7a2a
Make each WebView have it's own Window (Maybe these should be merged?) Connect the + button clicked signal to the Window plusButtonClicked slot which then tells the bridge of the tab that is currently showing (if possible) to show it's backstage view. If there's somehow no visible tab show the functional dialog instead. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: Ie59b110122bcee189a046ac21697f55f93c96ddd
Instead of just asking if we should save/discard/cancel prompt for each modified file if it should be saved, discarded, or cancel closing. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: I1dc6cbfa05e15ee4515559c2f5863475d67c2f84
When only 1 tab/document is open in a window hide the tab bar for now. NOTE: This removes the drop target for merging windows back together, but that can be fixed separately with a "Merge all windows" menu item or similar. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: Id46651e41d4239332f7db7fc6a7cb4b03206562b
Depending on the mime type of the current tab/document show x-office-(document|spreadsheet|presentation|drawing).svg Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: If47389df617fcdfc4cd56f5b8473d66dcbc12eb5
When Gather Windows is triggered gather all tabs from separate windows into one primary window. Adds a windowCount method to only enable the Gather Windows action if there are multiple tabs. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: I82798bcac466d5a6b4dbcd6e0ea5d1b69a7b7552
- Properly close the starter tab instead of a whole window. - Open new documents in new tabs instead of a new window by default. - Never open or create documents in the starter screen. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: I5a91c768b6e10b7cdf353ae74480277bc616e90f
To prevent a white line appearing around the whole document/window on GNOME hide the border around the tabwidget completely. Also use a light theme or dark theme depending on the system theme for the tabs themselves. Signed-off-by: Jeremy Whiting <[email protected]> Change-Id: I112ffeda99082ffc6ba234c1f91faec2d4361b1e
7ef7e23 to
9128b12
Compare
Ok, I removed my commit that tried to handle ctrl-w on the Qt side since that somehow is only working on plasma. I took a quick stab at fixing the code in qt/coda-qt.cpp that handles closewin uno message, but didn't get it working. I guess that will be up to you now since I'm off the project. I also changed the last commit that just removed the border to also use a light or dark theme depending on the system theme. That works fine in plasma but I've no idea how to set the gnome theme to test on gnome. I'll leave that to you also but it should work I guess since it uses portalPrefersDark() from WebView. |






Summary
TODO
Checklist
make prettier-writeand formatted the code.make checkmake runand manually verified that everything looks okay