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

Added dynamic tab alignment support in MultiPageEditorPart #2224

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

praveen-skp
Copy link
Contributor

Issue: #2223

This pull request introduces a new feature in Eclipse that allows users to configure the alignment of tabs in multi-page editors. The tabs, which are currently fixed at the bottom, can now be dynamically positioned on the top or bottom, based on user preference.

Key Changes:

  • Added a new preference for multi-page editor tab alignment.
  • Added a preference change listener to MultiPageEditorPart.
  • Updated tab style based on the user's preference.

New preference:
New preference selected

Tabs on top of the screen:
Expected look

Copy link
Contributor

github-actions bot commented Aug 27, 2024

Test Results

 1 815 files  ±0   1 815 suites  ±0   1h 35m 59s ⏱️ - 1m 0s
 7 699 tests ±0   7 471 ✅ +1  228 💤 ±0  0 ❌  - 1 
24 258 runs  ±0  23 511 ✅ +1  747 💤 ±0  0 ❌  - 1 

Results for commit 2aba601. ± Comparison against base commit fe9d7e2.

♻️ This comment has been updated with latest results.

Copy link
Member

@iloveeclipse iloveeclipse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interesting feature, but ideally it should also give custom multipage editors control whether they want to follow up the tab position or keep some specific tab position independently of the preference, see also coment in code.

@tomaswolf
Copy link
Member

... ideally it should also give custom multipage editors control whether they want to follow up the tab position or keep some specific tab position independently of the preference...

Not sure about this. UI consistency is important. If every multipage editor gets to decide on its own, we'll end up with some having the tabs at the top and some at the bottom. Isn't that going to be confusing or at least inconvenient for users?

@iloveeclipse
Copy link
Member

Isn't that going to be confusing or at least inconvenient for users?

I'm thinking about products like ours where the editors tab position is important because we have lot of complicated and nested UI elements, so users "occasionally" changing global preference would see "broken" UI's in the places where nothing was changed for years.

@BeckerWdf BeckerWdf added the noteworthy Noteworthy feature label Aug 27, 2024
@praveen-skp
Copy link
Contributor Author

Hi @iloveeclipse, Hi @laeubi ,
I have incorporated the review comments. Could you please go through the change once again ?

- Added a new preference for multi-page editor tab alignment.
- Added a preference change listener to MultiPageEditorPart.
- Updated tab style based on the user's preference.
- Changed the check box to drop down with Top and Bottom options
- Made the private methods protected
- Converted the preference store value from boolean to int and storing
the SWT value of the selection directly
@BeckerWdf
Copy link
Contributor

New preference: New preference selected

I wondering if we should move the new checkbox above the "Number of open editor..." setting so that all checkboxes are next to each other?
Did you move it below the "Number of open editor..." by intention?

@praveen-skp
Copy link
Contributor Author

Dropdown
Sorry, i forgot to add the current UI after the change. Its now changed from check box to dropdown, after incorporating the review comments.

@BeckerWdf
Copy link
Contributor

Sorry, i forgot to add the current UI after the change. Its now changed from check box to dropdown, after incorporating the review comments.

Ah yes. Forgot that. In that case I think the ordering is ok. And I just realised that the "Automatically close.." checkbox and the next input field belong together. One can see this via the indentation. Maybe we could make this more explicit but putting a box around these two - but that would be a different issue.

@BeckerWdf
Copy link
Contributor

but that would be a different issue

Created #2297 for this.

@BeckerWdf
Copy link
Contributor

I'm thinking about products like ours where the editors tab position is important because we have lot of complicated and nested UI elements, so users "occasionally" changing global preference would see "broken" UI's in the places where nothing was changed for years.

I have some doubts: So with the current state the user could set the preference but some individual editor may not consider this. Isn't this strange behaviour from the user's perspective.
I see your use-case but can we find another solution for it? E.g. having a mechanisms for a product definition to hide this new preference so that in your product the user cannot choose to have editor tabs at the top?

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

Successfully merging this pull request may close these issues.

5 participants