Skip to content
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

Don't show tab bar if there's only one tab #1955

Closed
bertob opened this issue Dec 25, 2022 · 9 comments
Closed

Don't show tab bar if there's only one tab #1955

bertob opened this issue Dec 25, 2022 · 9 comments
Labels
feature A new feature

Comments

@bertob
Copy link
Contributor

bertob commented Dec 25, 2022

We generally don't show tab bars when there's a single one (except in Builder, but that's for reasons which don't really apply to other apps, i.e. that it has an in-app tiling system). The current status quo is not great, because there's a useless second bar at all times, which just says "main" when you create a new model:

image

As far as I understood, the bar was enabled to make it clearer which diagram you're currently working on, so we'd need to find an alternative place to show the title. Would the window title in the headerbar be an option here, e.g. instead of "Gaphor" in the example above?

Independently from that we should find a better default name than "main". Would something like "Diagram 1" or "Main Diagram" work?

Followup from #1926

@danyeaw
Copy link
Member

danyeaw commented Dec 26, 2022

Thanks @bertob for the suggestion!

I am assuming if there were two tabs open, and you close one, that the tab bar would collapse up, and the diagram would take up the space that the tab bar was using. Is that a correct understanding of how it would work?

@danyeaw danyeaw added the feature A new feature label Dec 26, 2022
@amolenaar
Copy link
Member

Yes. That's actually how it worked for 2.12. However, then the diagram name is no longer visible, so you can't know which diagram you're editing.

The header bae shows the name of the model (file name without suffix). If it's a new model it'll show Gaphor.

image

We could add the diagram name (in this case sequence-diagram – main).

I changed the diagram name to New diagram in #1956.

@bertob
Copy link
Contributor Author

bertob commented Jan 10, 2023

The header bae shows the name of the model (file name without suffix). If it's a new model it'll show Gaphor.

If the file name is visible below anyway, could we put the diagram name there instead? Alternatively I guess we could try "model name • diagram name" in the title?

@amolenaar
Copy link
Member

I'll give it a try. Alternatively we can also show the qualified name (packages + diagram name) in the top bar. We do not have space for that in the tabs, normally.

@amolenaar
Copy link
Member

amolenaar commented Jan 11, 2023

Like this?

image

Or show the full path?

image

If the path contains more than 3 elements, I suggest it's shown as Model :: … :: Package :: Diagram name.
For now I used :: as separator. I suppose , or · would also make a nice candidates.

image

I think showing the full path adds extra value, since there's no way currently to easily find the opened diagram in the model browser (tree).

@bertob
Copy link
Contributor Author

bertob commented Jan 11, 2023

I'd go with just the title, the full path gets too messy. If you think it's important an actual pathbar could be an option, but IMO just the name is fine, since the treeview on the left is always accessible. One thing to consider could be visually distinguishing the parent folder in the tree if it's collapsed, so it's easier to find the active item.

@amolenaar
Copy link
Member

Just the diagram name looks more clean indeed.

I also created #2005, which provides a Adw.StatusPage when no diagram is opened.

@danyeaw
Copy link
Member

danyeaw commented Jan 17, 2023

Closed by #2004.

@danyeaw danyeaw closed this as completed Jan 17, 2023
@danyeaw
Copy link
Member

danyeaw commented Jan 17, 2023

Thanks @bertob for your suggestion for improvement and @amolenaar for your implementation 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature
Projects
None yet
Development

No branches or pull requests

3 participants