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

New UI: Tab component #294

Closed
damianmoore opened this issue Jul 12, 2021 · 2 comments
Closed

New UI: Tab component #294

damianmoore opened this issue Jul 12, 2021 · 2 comments
Assignees
Labels

Comments

@damianmoore
Copy link
Collaborator

damianmoore commented Jul 12, 2021

This is a new component called <Tabs /> which is the start of UI redesign.

You can see the component at the bottom of these two screens:

new_ui_tabs

Please develop this as a Storybook first by adding a file inside ui/stories. You should then be able to access it at http://localhost:6006/ under the "Search" section.

Should accept the following prop structure:

<Tabs tabs={[
    {
        label: string,
        selected: boolean,
        onClick: function,
    },
]} />
  • Each label should be the same width (display grid or flex)
  • White/light grey background should show behind the tab that is selected
  • There should be a CSS transition that slides the background to the newly selected tab when selected item changes
  • There should be a CSS transition that fades between the text color when selected item changes
  • Note the dark grey background is slightly transparent
  • The radius of the tab background should fit neatly inside the radius of the overall component background
  • useState should not be used inside this component for storing selected tab (the parent will handle this)

Once you have the component functioning, you'll need to remove the <ul className="tabs"> section of <Browse /> and add your new component to the page and make it switch between "Timeline" and "Map" views.

  • Make sure that URL GET params (e.g. /?mode=map) are still used. If the user refreshes on Map mode then the map tab should be selected
@GyanP
Copy link
Collaborator

GyanP commented Jul 22, 2021

Task done and changes pushed on branch 294-Tab-component-stories

@GyanP GyanP moved this from To do to Review in progress in Development tasks Jul 22, 2021
@damianmoore damianmoore moved this from Review in progress to Reviewer approved in Development tasks Aug 8, 2021
@damianmoore
Copy link
Collaborator Author

Merged as of c0fdeb7 and in release v0.23.0

Development tasks automation moved this from Reviewer approved to Done Aug 2021 Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development tasks
Done Aug 2021
Development

No branches or pull requests

2 participants