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

Minor cosmetic issues with the visible focus outline fixed #9897

Merged
merged 3 commits into from
Dec 14, 2022
Merged

Minor cosmetic issues with the visible focus outline fixed #9897

merged 3 commits into from
Dec 14, 2022

Conversation

AllanOXDi
Copy link
Member

@AllanOXDi AllanOXDi commented Dec 3, 2022

Summary

This PR fixes minor cosmetic issues with the visible focus outline.
closes #9484

References

Before:
image## Reviewer guidance

image

After:
Screenshot 2022-12-05 at 16 47 18

Screenshot 2022-12-05 at 16 48 07

Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

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

Hi @AllanOXDi - this looks good. I see the change you have on the manage permissions page grid. 👍 However, I think maybe you forgot to push some of your changes - the "Add new address" updates aren't here.

@AllanOXDi AllanOXDi requested a review from radinamatic December 7, 2022 17:10
@AllanOXDi
Copy link
Member Author

AllanOXDi commented Dec 7, 2022

I think that's the only change I made. It should be able to work as intended.

@pcenov
Copy link
Member

pcenov commented Dec 8, 2022

Hi @AllanOXDi there are 3 specific issues mentioned in #9484 while the only one that is actually fixed by this PR is the one on the 'Device permissions' page. How do we proceed with the other issues?

@AllanOXDi
Copy link
Member Author

@pcenov, This commit should be able to address it. I am worried about the border moving up. Tagging @jtamiace for her insight on this.

screen-.3.webm.mp4

cc @radinamatic

@jtamiace
Copy link
Member

jtamiace commented Dec 9, 2022

@AllanOXDi I'm not sure what the solution here is via code, but it would be ideal if the border could remain on the gray line.

@AllanOXDi
Copy link
Member Author

This would be the best option . But that would require us to make changes from the header tab. My fear is when we make a change from that component, it will break a lot of things.

@jtamiace
Copy link
Member

jtamiace commented Dec 9, 2022

I see. I'm not sure if this makes more sense as a separate issue, but if changes are needed to the component itself, I've been looking at an alternative layout for these tabs in designs for a separate project that might also address this outline problem?

Screen Shot 2022-12-09 at 12 17 53 PM

@marcellamaki
Copy link
Member

marcellamaki commented Dec 9, 2022

Hi @AllanOXDi and @jtamiace -

Jessica, these are interesting updates! I think better addressed in a separate issue, and we can make sure that the focus changes are still prioritized there, though. But, thanks for sharing this as an option. When we create a KTabGroup component, then at least on the code side, this side panel would be a place we would want to refactor and use it. (Not saying it has to inform your designs.... just that we will be happy to add these designs as we refactor that - we can do it all in one project perhaps!)

Allan - I have a suggestion for a way to update the HeaderTab.vue component that doesn't require making too many changes that might break things. My idea is to swap your changes and instead add:
outline-offset: -2px !important;

to the .header-tab class to get:
Screen Shot 2022-12-09 at 4 35 48 PM

This is not something you could have reasoned out without knowing more, so here's some context:

  • Generally, we try to avoid using !important where we can, as it's an override, and it might indicate that there is another or better way to do something
  • However, this focusOutline and it's "offset" are set in KDS in the main theme to be 4px (this is kind of KDS trivia, but good to remember!)
  • This means that the focus outline being slightly larger than the element is the default behavior
  • In almost all instances, this makes sense! It looks cleaner to have the focus outline going around a button, for example, than on top of it, and prevents potentially covering up or cutting off information, especially on smaller sizes.
  • However, I think you may have found an instance where we need an exception, not the rule! There are a handful of other places where we use the same fix in other places in Kolibri (search for "outline-offset" and you'll see it)
  • The most common places we have to adjust is situations like this - where we have a focusable element, such a link or button, that is visually distinct from the KDS defaults, or when they are layered or immediately next to other elements. In this example, the focus outline is there, it's just behind the rest of the side panel.

Give it a try and see what you think. The outline is not quite as pretty this way, as it is not entirely in the shape of the nice rounded tab, but I think that's okay.

@pcenov
Copy link
Member

pcenov commented Dec 12, 2022

Fantastic @AllanOXDi - the visible focus is now displayed correctly in all 3 cases.

Copy link
Member

@radinamatic radinamatic left a comment

Choose a reason for hiding this comment

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

Great job, thank you @AllanOXDi!

Manual QA passed, good to go! 🥳 💯 :shipit:

@marcellamaki
Copy link
Member

Nice work @AllanOXDi!

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

Successfully merging this pull request may close these issues.

5 participants