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

471 - add official link icon #514

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

Conversation

JuanCaicedo
Copy link

Note: This PR builds on #508 and is blocked until that merges. To make reviewing easier, I opened this PR against that one. After #508 merges, I'll change the base branch to master 👍

Motivation

Proposed changes

  • Adds a clickable icon to next to the route name for routes that have official links

Screenshot

image

@JuanCaicedo JuanCaicedo force-pushed the jcaicedo/421-links-to-official-route-pages-breadcrumbs branch from a0172cb to 5d35b07 Compare January 30, 2020 00:51
Comment on lines 45 to 46
position: 'relative',
top: '5px'
Copy link
Author

Choose a reason for hiding this comment

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

I'm not really sure what's going on here, but adding the icon svg leads to some weird alignments 😅

It causes the whole line to grow to 33px from the original 28px.
image

And also the a tag doesn't seem to wrap completely around the icon, which sits higher than the link box
image

This makes the icon not aligned with the text next to it.
image

Thought I tried to figure all this out, it seemed easier to just visually center the icon 😅

@hathix
Copy link
Member

hathix commented Jan 30, 2020

One UX question: does that link icon go to the same place as the blue link? My initial expectation as a user is that they both go to the same place. If they don't, you may want to change the icon to make it more obvious that it's a different link. Perhaps changing it to a circled (I) would make it clearer.

@hathix
Copy link
Member

hathix commented Jan 30, 2020

We merged #508 so you can rebase this :)

@exxonvaldez
Copy link
Contributor

Looks pretty good, thanks for doing this! I found that using the SVG icons with text was pretty difficult also, and the relative position "trick" seems like the best way to go that I've found. I noticed that the breadcrumbs are just slightly out of alignment vertically, I think it's because the icon makes the first breadcrumb taller than the others. Not sure what the best fix is for this.

Screen Shot 2020-01-29 at 7 45 25 PM

@youngj
Copy link
Contributor

youngj commented Jan 30, 2020

Agree with @hathix - with this UI, I would expect that clicking either the icon or the adjacent link will open a page in a new window. It would make more sense to me to have a text link that says something like "Official Site" next to the "open in new window" icon. This would probably be too much to display within the breadcrumb text itself, but could be floating on the right side of the white bar.

Copy link
Member

@hathix hathix left a comment

Choose a reason for hiding this comment

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

Hey Juan,

Everything looks good, but you'll want to address the UX concerns Jesse and I had. I think the easiest way out is to turn the share icon into an "i" in a circle. Or you can put the "route info" section on the right side of the white bar in a badge or something.

@JuanCaicedo JuanCaicedo force-pushed the jcaicedo/421-links-to-official-route-pages-breadcrumbs branch from 8bed38a to 698a5a0 Compare February 13, 2020 04:28
@JuanCaicedo JuanCaicedo changed the base branch from feature/breadCrumbsUI to master February 13, 2020 04:29
@JuanCaicedo
Copy link
Author

I made a few changes here 😀

  • Change the open in new window icon to Official Site
  • Align the link to the right side of the nav bar

image

Comment on lines +37 to +38
display: 'flex',
justifyContent: 'space-between',
Copy link
Author

Choose a reason for hiding this comment

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

This looks a little weird on mobile
image

I think solving it could be as simple as adding a media query that sets flexDirection: column for mobile sizes, but I'm not sure how to do media queries within Material UI 😅 The strategy I found in their docs seems complicated, which makes me think I might be looking at the wrong approach

Copy link
Member

Choose a reason for hiding this comment

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

Nah, don't overcomplicate it.

The more elegant solution, to me, is to make that text label only visible on medium and large screens (you can do that with tools from here, i think) and replace it with a small icon on small screens.

@hathix
Copy link
Member

hathix commented Feb 13, 2020

You got a lint error, by the way. See the test / test result

@hathix
Copy link
Member

hathix commented Feb 13, 2020

Anyway, I think your approach of using the "Official Site" on the right side was great. Much better from a UX perspective.

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.

Add links to official pages for routes and stops when available
4 participants