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

Change SideBar "menu" icon #6516

Merged
merged 4 commits into from Feb 12, 2021
Merged

Change SideBar "menu" icon #6516

merged 4 commits into from Feb 12, 2021

Conversation

chenbh
Copy link
Contributor

@chenbh chenbh commented Feb 5, 2021

What does this PR accomplish?

Bug Fix | Feature | Documentation

closes #5970

Blocked on #6453 since it uses the new Tooltip.Bottom alignment

Changes proposed by this PR:

Update the icon and add tooltips

Notes to reviewer:

Release Note

  • Updated the visuals for the button to open and close the sidebar

Contributor Checklist

Reviewer Checklist

  • Code reviewed
  • Tests reviewed
  • Documentation reviewed
  • Release notes reviewed
  • PR acceptance performed
  • New config flags added? Ensure that they are added to the
    BOSH and
    Helm packaging; otherwise, ignored for
    the integration
    tests

    (for example, if they are Garden configs that are not displayed in the
    --help text).

Copy link
Contributor

@aoldershaw aoldershaw left a comment

Choose a reason for hiding this comment

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

Looks good, just one thing around the icon when there are no visible pipelines (and the sidebar can't be opened)

HoverState.Tooltip SideBarIcon _ ->
let
text =
if sideBarState.isOpen then
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor thing, but when there are no pipelines (or e.g. you haven't logged in yet and there are no exposed pipelines), you can't actually click on the sidebar icon. Perhaps we shouldn't brighten the icon when you hover over but the icon is not clickable, and perhaps we should give a helpful tooltip (e.g. the sidebar cannot be expanded when there are no pipelines)

Screen Shot 2021-02-08 at 11 24 58 AM

(can hover over and it suggests that you can expand the sidebar, but you cannot)

Or even weirder
Screen Shot 2021-02-08 at 11 29 01 AM
(sidebar was open before logging out/the session expiring, so it displays the hide sidebar icon, but since there are no pipelines the sidebar is hidden)

hamburgerIcon : { isHovered : Bool, isActive : Bool } -> List (Html.Attribute msg)
hamburgerIcon { isHovered, isActive } =
sideBarIcon : Bool -> List (Html.Attribute msg)
sideBarIcon isHovered =
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps this should have an isClickable (or just keep the isActive) for the reasons suggested above

EstebanFS and others added 3 commits February 11, 2021 10:36
- replaced the icon
- differentiated between closed and opened sidebar
- added tooltips for the button
- fixed some tests, we're saving the SideBarFeature tests for a later
commit

Signed-off-by: Esteban Foronda <eforonda@vmware.com>
Co-authored-by: Bohan Chen <bochen@pivotal.io>
- renamed hamburger -> sidebar
- added tests for when the sidebar is open/closed
- added tests for hover tooltips
- replaced the background color tests (since it no longer changes based
on if the sidebar is open or not)

Signed-off-by: Esteban Foronda <eforonda@vmware.com>
Co-authored-by: Bohan Chen <bochen@pivotal.io>
- stopped using opacity and instead use 4 separate svg for open/closed +
hovered/unhovered states
- update tests

Signed-off-by: Esteban Foronda <eforonda@vmware.com>
Co-authored-by: Bohan Chen <bochen@pivotal.io>
Copy link
Contributor

@aoldershaw aoldershaw left a comment

Choose a reason for hiding this comment

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

Looks good! Just need to fix yarn benchmark now (web/elm/benchmarks/Benchmarks.elm): https://ci.concourse-ci.org/builds/86742463#L6022bb40:45:48

- Adding no pipeline tooltip message
- Keeping sidebar grey when is not clickable
- Adding no pipeline tooltip message test
- Updating tests
- Updating benchmarks

Signed-off-by: Esteban Foronda <eforonda@vmware.com>
Co-authored-by: Bohan Chen <bochen@pivotal.io>
Copy link
Contributor

@aoldershaw aoldershaw left a comment

Choose a reason for hiding this comment

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

LGTM!

@EstebanFS EstebanFS merged commit ab76fa8 into master Feb 12, 2021
@EstebanFS EstebanFS deleted the issue/5970 branch February 12, 2021 14:38
@clarafu clarafu added the release/undocumented This didn't warrant being documented or put in release notes. label Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement release/undocumented This didn't warrant being documented or put in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change 'menu' icon in header
4 participants