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

Switch to using more official browser brand icons #5991

Merged
merged 21 commits into from
Jan 10, 2020

Conversation

hiramzamorano
Copy link
Contributor

@hiramzamorano hiramzamorano commented Dec 18, 2019

User facing changelog

We replaced the browser icons in the Test Runner with more official browser brand icons.

How has the user experience changed?

Before
Screen Shot 2019-12-17 at 6 54 27 PM

After

Screen Shot 2020-01-09 at 10 27 52 PM

PR Tasks

  • Have tests been added/updated?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 18, 2019

Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.

  • Please write [WIP] in the title of your Pull Request if your PR is not ready for review - someone will review your PR as soon as the [WIP] is removed.
  • Please familiarize yourself with the PR Review Checklist and feel free to make updates on your PR based on these guidelines.

PR Review Checklist

If any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'.

User Experience

  • The feature/bugfix is self-documenting from within the product.
  • The change provides the end user with a way to fix their problem (no dead ends).

Functionality

  • The code works and performs its intended function with the correct logic.
  • Performance has been factored in (for example, the code cleans up after itself to not cause memory leaks).
  • The code guards against edge cases and invalid input and has tests to cover it.

Maintainability

  • The code is readable (too many nested 'if's are a bad sign).
  • Names used for variables, methods, etc, clearly describe their function.
  • The code is easy to understood and there are relevant comments explaining.
  • New algorithms are documented in the code with link(s) to external docs (flowcharts, w3c, chrome, firefox).
  • There are comments containing link(s) to the addressed issue (in tests and code).

Quality

  • The change does not reimplement code.
  • There's not a module from the ecosystem that should be used instead.
  • There is no redundant or duplicate code.
  • There are no irrelevant comments left in the code.
  • Tests are testing the code’s intended functionality in the best way possible.

Internal

  • The original issue has been tagged with a release in ZenHub.

@claassistantio
Copy link

claassistantio commented Dec 18, 2019

CLA assistant check
All committers have signed the CLA.

@jennifer-shehane
Copy link
Member

@hiramzamorano Thanks for the contribution! Could you please sign our CLA? #5991 (comment)

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

  • All of the tests verifying the icons are correct have been removed. We need tests that the correct image displays, not just any image. Removing the test for the custom browser, I can already manually see that the image is incorrect. This could be as simple as adding a class to each img, so testing that when Chrome is selected that the img.chrome is shown.
  • We need a custom 'globe' icon for browsers that are not defined. Users can pull in custom browsers (like Brave) and we don't want them to show up as Electron.

Screen Shot 2019-12-18 at 3 20 42 PM

@hiramzamorano
Copy link
Contributor Author

Hi @jennifer-shehane, thanks for the feedback, i'm going to fix those issues :)

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

The icons are not all the same width and height, which makes them not line up properly vertically in the dropdown and also the defaultBrowser icons doesn't line up vertically in the selection when selected.

without guidelines

Screen Shot 2019-12-23 at 1 27 58 PM

with guidelines to show horizontal and vertical places that are not aligned.

Screen Shot 2019-12-23 at 1 27 58 PM copy

packages/desktop-gui/src/project-nav/browsers.jsx Outdated Show resolved Hide resolved
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

I made a few commits to add back a missing test and fix the aligning of the icon in the selection.

My final comment is about the default generic icon. It doesn't look great to be honest. Is there a nicer looking 'world/globe' / generic browser icon you can use? It also shows up much larger than the other icons for some reason even thought the width and height are 16.

Screen Shot 2020-01-03 at 1 56 19 PM

@hiramzamorano
Copy link
Contributor Author

You're right @jennifer-shehane , we can improve the default generic icon to make it look better.
I can suggest you these options.

1)Screen Shot 2020-01-03 at 1 48 10 PM

2)Screen Shot 2020-01-03 at 1 46 33 PM

3)Screen Shot 2020-01-03 at 1 39 55 PM

4)Screen Shot 2020-01-03 at 1 38 40 PM

5)Screen Shot 2020-01-03 at 1 45 11 PM

6)Screen Shot 2020-01-03 at 1 42 40 PM

What do you think?

@jennifer-shehane
Copy link
Member

@hiramzamorano I prefer #5. Thanks for providing the options. 👍

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

The default browser icon still does not line up visually with the other icons. It appears larger and juts out to the left of all the other icons.

Screen Shot 2020-01-08 at 1 32 59 PM copy

This will be good to merge in after this is fixed.

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

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

@hiramzamorano I am not seeing any actual change in the display/alignment after the latest change.

Screen Shot 2020-01-09 at 11 49 03 AM

You can see this view by in the packages/desktop-gui directory running npm run watch then opening a new terminal and running npm run cypress:open. In here run the project_nav_spec and run the custom browser available set of tests. Select 'Chrome' which will put the Foo browser in the dropdown.

@hiramzamorano
Copy link
Contributor Author

It seems that the previous commit had no effect on the icon, that's weird because I was testing it with the steps you tell me.
The solution is to center the svg image in its own container, I made some small changes hoping that now if they are reflected.

This should be the end result.

Screen Shot 2020-01-09 at 10 27 52 PM

@jennifer-shehane jennifer-shehane merged commit d204d32 into cypress-io:develop Jan 10, 2020
kuceb added a commit that referenced this pull request Jan 10, 2020
@brian-mann
Copy link
Member

brian-mann commented Jan 10, 2020

The electron logo should not be electron - it should be dark Chrome. Our users don't care what the version of Electron is, they care about the version of Chromium that electron ships with.

On second thought - it may make more sense to use the Electron icon with the displayName as Electron (Chromium) 76

@jennifer-shehane
Copy link
Member

@hiramzamorano The team decided to revert this commit per these comments. #6141 (comment)

You're welcome to open a new PR. I'm sorry for the outcome of this. No one expressed their differing opinions from the team until after it was merged unfortunately.

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.

Switch to using more official browser brand icons
4 participants