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: drop down arrow overlapping text #1606

Merged
merged 1 commit into from Nov 5, 2019

Conversation

varshannagarajan
Copy link
Contributor

Description of changes

Modified width attribute for drop down title. Fixes issue #1219. There is a known issue where after the function is applied the drop down box shifts down outside of the title header. This will be addressed in a later PR.

Before Any Changes:
Dropdown Before Changes

After Changes but Letter Space Function not Applied::
Dropdown Normal

Letter Spacing Function Applied:
Dropdown Bookmarklet

Pull request checklist

  • Addresses an existing issue: WCAG 2.1 1.4.12 Text spacing in the Switcher  #1219
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). Check workflow guide at: <rootDir>/docs/workflow.md
  • (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

@varshannagarajan varshannagarajan requested a review from a team as a code owner November 1, 2019 21:45
@ferBonnin ferBonnin added the pr: DO NOT MERGE Dont merge this PR. label Nov 1, 2019
@peterdur peterdur removed the pr: DO NOT MERGE Dont merge this PR. label Nov 5, 2019
Copy link
Contributor

@peterdur peterdur left a comment

Choose a reason for hiding this comment

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

Approving width change. Looking forward to future PRs around this scenario as described in #1219!

@peterdur peterdur merged commit 32e3774 into microsoft:master Nov 5, 2019
dbjorge added a commit that referenced this pull request Dec 5, 2019
…1803)

#### Description of changes

This PR fixes an issue caught during v2.11.0 release validation introduced in #1606 where if you resize the details view down to the minimum window size allowed by Chrome (500px) at default zoom levels, the settings gear icon overflows out of the header bar:

![screenshot with missing settings icon](https://user-images.githubusercontent.com/376284/70194913-f1846280-16b8-11ea-8a0f-9765db695f97.png)

@varshannagarajan 's outstanding PR #1693 fixes a variant of this issue for the switcher dialog at high zoom/text spacing levels. This PR takes the same idea as #1693 but expands it to the entire header bar (it therefore obsoletes #1693)
* It runs the *entire* header bar into a flexbox
* It enables text-overflow behavior on the extension title, so it will shrink before functional elements do
* It adjusts styling slightly such that everything fits at default zoom level + Chrome's default minimum window size (500px)

Since this essentially amounted to a rewrite of the relevant styling, I took it as an opportunity to pull it out of the big shared scss files and into modules. This involved a little gymnastics for some of the office fabric style overrides that previously relied on being within a `#details-container` selector to achieve the necessary specificity.

To enable re-use of the new modularized styles in guidance pages, this also extracts out the common parts of the header to a new common Header component for the guidance content page to reuse. This happened to be the first point where the guidance content pages required css module styles, so I also added the necessary reference from `insights.html` to `bundle/insights.css`.

The most questionable bit of CSS is the use of `margin-left: auto` on the settings icon styling to get it to functionally float right inside the flexbox; I thought using this was a little more pleasant to reason about than the alternative of using nested flexboxes in the same direction, but was a bit on the fence about which technique to use.

Screenshots:

**details view, 500px 100% zoom**
![image](https://user-images.githubusercontent.com/376284/70195769-76707b80-16bb-11ea-9223-af35246e3051.png)

**details view, 500px 100% zoom, text-spacing bookmarklet**
![image](https://user-images.githubusercontent.com/376284/70196042-4675a800-16bc-11ea-9854-985bab775fdf.png)

**details view, 1280px, 100% zoom**
![image](https://user-images.githubusercontent.com/376284/70195982-162e0980-16bc-11ea-82cf-a4f5f5ae7ca3.png)

**details view, 1280px 400% zoom**
![image](https://user-images.githubusercontent.com/376284/70195991-21813500-16bc-11ea-8ffb-7d9ebcd0bf97.png)

**fastpass report, 500px 100% zoom**
![image](https://user-images.githubusercontent.com/376284/70195911-eaab1f00-16bb-11ea-9dd6-ed1f8e4b4fed.png)

**assessment report, 500px 100% zoom**
![image](https://user-images.githubusercontent.com/376284/70195923-f860a480-16bb-11ea-9a60-af13bc25c463.png)


#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox -->
- [n/a] Addresses an existing issue: #0000
- [x] Ran `yarn fastpass`
- [x] Added/updated relevant unit test(s) (and ran `yarn test`)
- [x] Verified code coverage for the changes made. Check coverage report at: `<rootDir>/test-results/unit/coverage`
- [x] PR title *AND* final merge commit title both start with a semantic tag (`fix:`, `chore:`, `feat(feature-name):`, `refactor:`). Check workflow guide at: `<rootDir>/docs/workflow.md`
- [x] (UI changes only) Added screenshots/GIFs to description above
- [x] (UI changes only) Verified usability with NVDA/JAWS
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.

None yet

3 participants