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

Fix tabs appearance #4815

Merged
merged 1 commit into from Nov 14, 2023
Merged

Conversation

marcoambrosini
Copy link
Contributor

☑️ Resolves

  • Fix #…

🖼️ Screenshots

🏚️ Before 🏡 After
Screenshot 2023-11-14 at 18 47 54 Screenshot 2023-11-14 at 18 30 22

🚧 Tasks

  • ...

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@marcoambrosini marcoambrosini self-assigned this Nov 14, 2023
@marcoambrosini marcoambrosini added enhancement New feature or request 3. to review Waiting for reviews labels Nov 14, 2023
Signed-off-by: Marco <marcoambrosini@icloud.com>
Copy link
Contributor

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Looks good design-wise, any detail fixes can be done later or next release.

@susnux
Copy link
Contributor

susnux commented Nov 14, 2023

So do we want to go back with the design? This was basically the reason we needed to go with a new major release.
Should we also adjust the NcCheckboxRadioSwitch button grouped styling?

@raimund-schluessler
Copy link
Contributor

Why do we go back now? The design feedback in nextcloud/server#41450 does not say anything about this, just mentions a small fix.

:deep(.checkbox-radio-switch--button-variant.checkbox-radio-switch) {
border: unset;
// Override checkbox-radio-switch styles so that it looks like tabs
:deep(.checkbox-radio-switch--button-variant) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This completely changes the UI of the component, should we instead change that component?
Because this is now very likely to break on slight changes of the internals of NcCheckboxRadioSwitch.
For the same reason I feel quite uncomfortable with that the many !important statements.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we first learn what the intended goal is here? Do we intend to go back with the design completely? Is it just about small fixes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There has been a last minute request to revert this, sorry. It's a last minute fix that concerns only the sidebar tabs, hence the deep and important. It's temporary, not permanent. We can discuss what to do with checkboxradioswitch later on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That said, I think we're trying to do way too many things with NcCheckboxRadioSwitch

Copy link
Contributor

Choose a reason for hiding this comment

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

@marcoambrosini can you make sure it doesn’t break in these 2 places:

  • Sharing flow where we use the component vertically (right?)
  • Forms on top right, where we use it for View/Edit/Results

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we first learn what the intended goal is here? Do we intend to go back with the design completely? Is it just about small fixes?

@raimund-schluessler Yes to both: It is about small fixes, and the active tab being way too present has been identified as a visual issue. Going to a middle ground between the old and new one seems a good way to go.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are we sure this won't cause a11y issues? Cc @JuliaKirschenheuter

Copy link
Contributor

@ShGKme ShGKme Nov 14, 2023

Choose a reason for hiding this comment

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

Are we sure this won't cause a11y issues? Cc @JuliaKirschenheuter

It only changes styles, so the only possible a11y issues could be about state styles and contrast. With the contrast everything is fine.

But with states it is not.

The current tab should have hover and active state styles.

Before After
with-state no-state

@jancborchardt
Copy link
Contributor

Why do we go back now? The design feedback in nextcloud/server#41450 does not say anything about this, just mentions a small fix.

@raimund-schluessler the concrete issue is that it’s much too present and makes everything more busy. The "primary" style is ok for the primary action buttons, and it’s also good for the left navigation, but also having this in the right sidebar makes it a bit much. It’s a classic case of "if everything is important, nothing is". :) Does that explain it?

@raimund-schluessler
Copy link
Contributor

Why do we go back now? The design feedback in nextcloud/server#41450 does not say anything about this, just mentions a small fix.

@raimund-schluessler the concrete issue is that it’s much too present and makes everything more busy. The "primary" style is ok for the primary action buttons, and it’s also good for the left navigation, but also having this in the right sidebar makes it a bit much. It’s a classic case of "if everything is important, nothing is". :) Does that explain it?

Thanks for the explanation.

I just wonder whether adjusting the color would be enough then, instead of going back to the old design and potentially breaking quite some things. E.g. one could use a similar style to a secondary button:

Screenshot 2023-11-14 at 12-14-23 Nextcloud Vue Style Guide

@nickvergessen
Copy link
Contributor

I just wonder whether adjusting the color would be enough then, instead of going back to the old design and potentially breaking quite some things. E.g. one could use a similar style to a secondary button:

This was an intermediate solution, but did not work correctly:
#4791
Maybe it was not used fully correct as it had primary color text on the secondary color or something, but at least it was non-trivial as well

@jancborchardt
Copy link
Contributor

I just wonder whether adjusting the color would be enough then, instead of going back to the old design and potentially breaking quite some things. E.g. one could use a similar style to a secondary button

@raimund-schluessler as @nickvergessen mentioned this was actually not accessible, reason being that there was too little contrast between an active entry and a non-active entry. They were not distinguishable. The bar below on this design achieves that.

@raimund-schluessler
Copy link
Contributor

I just wonder whether adjusting the color would be enough then, instead of going back to the old design and potentially breaking quite some things. E.g. one could use a similar style to a secondary button

@raimund-schluessler as @nickvergessen mentioned this was actually not accessible, reason being that there was too little contrast between an active entry and a non-active entry. They were not distinguishable. The bar below on this design achieves that.

Hm, I guess we are stuck with the old, and now inconsistent, design then, since no one has a better solution 😕

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

The current tab should also have hover and active state styles.

Before After
with-state no-state

@ShGKme
Copy link
Contributor

ShGKme commented Nov 14, 2023

As was mentioned in the old PR (#3945 (comment)), from the design perspective, I'd prefer to go with this PR's design.

IMO, the radio button switch doesn't look like a tab but presents a tab.


I also agree with @susnux that it should not be implemented by deep override of the radio switch. However, I think we can merge it to have the new design soon, and fix the implementation later.

@jancborchardt
Copy link
Contributor

@ShGKme since Marco is probably already out of office since he is on Japan time, could I ask you to add a hover style there which fits accessibility requirements?

@AndyScherzinger AndyScherzinger added this to the 8.0.2 milestone Nov 14, 2023
@ShGKme
Copy link
Contributor

ShGKme commented Nov 14, 2023

@ShGKme since Marco is probably already out of office since he is on Japan time, could I ask you to add a hover style there which fits accessibility requirements?

Asked @JuliaKirschenheuter to check as she also worked on this problem with the previous tabs state styles.

@ShGKme
Copy link
Contributor

ShGKme commented Nov 14, 2023

https://www.w3.org/WAI/ARIA/apg/patterns/tabs/ https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/

Effects from the link:

  • The current tab has a line above
  • Any tab has a border inside on hover
  • Any tab has a border inside on active (after click)

test

@JuliaKirschenheuter
Copy link
Contributor

JuliaKirschenheuter commented Nov 14, 2023

https://www.w3.org/WAI/ARIA/apg/patterns/tabs/ https://www.w3.org/WAI/ARIA/apg/patterns/tabs/examples/tabs-automatic/

Effects from the link:

  • The current tab has a line above
  • Any tab has a border inside on hover
  • Any tab has a border inside on active (after click)

test

@jancborchardt could we create same styles for our Tabs?

@ShGKme
Copy link
Contributor

ShGKme commented Nov 14, 2023

Note, in the w3 example, they use the same styles as used on keyboard navigation.

So in this PR it would look like this. But better to have a gap between the current tab bottom border and the outline.

image

@marcoambrosini
Copy link
Contributor Author

@ShGKme @JuliaKirschenheuter I have doubts about the need of this outline for the active state, let alone any hover effects. We've been told before that no hover effects are ever necessary for accessibility.
The link you posted contains one accessible solution, not the only accessible solution.

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

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

@ShGKme @JuliaKirschenheuter I have doubts about the need of this outline for the active state, let alone any hover effects. We've been told before that no hover effects are ever necessary for accessibility. The link you posted contains one accessible solution, not the only accessible solution.

Without active state, it is not visible if this component is under keyboard navigation right now or not.

For example, I see this state:

image

If I press Right, will I move to another tab or not? It is unknown because the user doesn't know if the tab button is active or not.

Probably I need to click on the element first. But there is also no hover effect to show that it is clickable (not about a11y).

But let's merge and discuss/fix changes later to have this earlier before the release.

@raimund-schluessler
Copy link
Contributor

raimund-schluessler commented Nov 14, 2023

Honestly, I feel like this change is a bit drastic and rushed, given that the problem to solve is the tab active being "much too present and makes everything more busy" (basically just an attention issue).

With the changes proposed we will introduce hover and active state issues, get an inconsistent design, probably conflicts with the checkbox-radio-switch component, and maybe more. And all this just to fix an attention issue (not even a11y, since this is fine, as far as I understand it). We have other places in the design where we use primary as a background, e.g. the active navigation entry
Files
yet, this seems to be ok, while also diverting the attention.

@JuliaKirschenheuter
Copy link
Contributor

If I press Right, will I move to another tab or not? It is unknown because the user doesn't know if the tab button is active or not.

Probably I need to click on the element first. But there is also no hover effect to show that it is clickable (not about a11y).

Agree! But our light gray color like on hover won't help at all. If this is a requirement then it have to be solved differently. I can't find requirements regarding active styles here https://www.w3.org/WAI/ARIA/apg/patterns/tabs/. And would say we can merge it like it is for now.

@AndyScherzinger AndyScherzinger merged commit 47201f1 into master Nov 14, 2023
15 checks passed
@AndyScherzinger AndyScherzinger deleted the enh/improve-appsidebartabs-look branch November 14, 2023 16:43
@AndyScherzinger AndyScherzinger modified the milestones: 8.0.2, 8.1.0 Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants