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

feat(nav): Updated search map title & icon #1894

Merged
merged 6 commits into from
Jan 26, 2023
Merged

Conversation

KaylaBrady
Copy link
Contributor

@KaylaBrady KaylaBrady commented Jan 24, 2023

ticket: https://app.asana.com/0/1200180014510248/1203548727085588

A few notes on this PR:

  • I thought about generalizing the other modes (ladder page, settings, shuttle map) to also use the NavMode interface so that searchMap isn't a special case in pageOrTabName. It seems doable and could also potentially simplify the router with something like a route-config file. That seems to be pushing the scope of this ticket. If reviewers are interested I can timebox incorporating that into this PR or create a tech-debt ticket for it.

  • Commits 4c37a32 212519f and 4c37a32 both have more detailed commits messages that provide some extra context for those changes.

…ssue

the height and width on the raw SVG file were both set to 24 (matching the viewbox definition). Surprisngly, the image was being cut off. I found that removing the height/width properties resolved the issue. Looking further into it, the viewport was being removed by svgo - see [this](svg/svgo#1128) extensively discussed issue. Since we are re-scaling the svg with CSS to 20x20, we do need to preserve the image viewbox. Applying the solution from [this](svg/svgo#1128 (comment)) comment
Going through all other icons to see which had a  viewbox that matched the width + height  and found only two: icon-garage and icon-up-right-arrow. icon-up-right-arrow had sizing explicitly set in CSS and was not affected. icon-garage defaulted to the leaflet default marker size of 12x12. This explicitly sets the iconSize to 21x25, matching what is specified in the SVG. I noticed that the width and height SVG properties are being removed as part of [svg-inline-loader](https://github.com/webpack-contrib/svg-inline-loader/tree/4bb5529fbdd847d7809067fe11840b48ee13dde4#removesvgtagattrs-boolean). I thought about turning off that behavior as part of this PR, but it seems like it could affect more icons and I'm not really sure if it is necessary
@KaylaBrady KaylaBrady marked this pull request as ready for review January 24, 2023 17:01
@KaylaBrady KaylaBrady requested a review from a team January 24, 2023 17:02
@github-actions
Copy link

Coverage of commit 4c37a32

Summary coverage rate:
  lines......: 94.3% (2691 of 2854 lines)
  functions..: 74.1% (1133 of 1530 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@@ -215,6 +217,8 @@ export const SaveIcon = svgIcon(saveIconSvg)

export const SearchIcon = svgIcon(searchIconSvg)

export const SearchMapIcon = svgIcon(searchMapIconSvg)
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: it's probably worth adding this icon to the list in icon.test.tsx, even if I have my doubts about how useful those particular tests are.

Copy link
Member

@lemald lemald left a comment

Choose a reason for hiding this comment

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

One quick comment about an opportunity to add a test, but otherwise looks good.

Copy link
Member

@firestack firestack left a comment

Choose a reason for hiding this comment

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

Oh neat! I wonder if 212519f (#1894) might fix the logo icon root scaling issue I encountered.

It seems like it should, but when I tried it locally somehow the skate logo is still getting it's viewbox stripped (after I exported the logo from the component library which had a viewbox on it, where our asset in the repo does not).

@github-actions
Copy link

Coverage of commit b3e2223

Summary coverage rate:
  lines......: 94.3% (2691 of 2854 lines)
  functions..: 74.1% (1133 of 1530 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@KaylaBrady KaylaBrady temporarily deployed to dev-green January 25, 2023 15:57 — with GitHub Actions Inactive
@KaylaBrady KaylaBrady temporarily deployed to dev-green January 26, 2023 14:24 — with GitHub Actions Inactive
@github-actions
Copy link

Coverage of commit 26c9acb

Summary coverage rate:
  lines......: 94.3% (2691 of 2854 lines)
  functions..: 74.1% (1133 of 1530 functions)
  branches...: no data found

Files changed coverage rate: n/a

Download coverage report

@KaylaBrady KaylaBrady merged commit c5a4766 into master Jan 26, 2023
@KaylaBrady KaylaBrady deleted the kb-search-map-nav branch January 26, 2023 14:50
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.

3 participants