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

M3-1988 Tag links #4195

Merged
merged 3 commits into from Dec 7, 2018
Merged

M3-1988 Tag links #4195

merged 3 commits into from Dec 7, 2018

Conversation

Jskobos
Copy link
Contributor

@Jskobos Jskobos commented Dec 5, 2018

added:

  • storybook-router-react added as a dev dependency (allows using a router decorator
    so that stories for components with Router don't break)

changed:

  • Tag is now a routable component
  • Make tags clickable in Tags.tsx and SearchSuggestion.tsx
  • Update tests
  • When clicked, a Tag will link to the search results page for its label
    (i.e. /search/?query=tag-name)

Copy link
Contributor

@johnwcallahan johnwcallahan left a comment

Choose a reason for hiding this comment

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

Nice work – functionality works well. Good call setting the root node component to button.

Copy link
Contributor

@rjstires rjstires left a comment

Choose a reason for hiding this comment

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

Move the router decorator to be globally available and we're good to go.


import ThemeDecorator from '../../utilities/storybookDecorators';
import Tag from './Tag';

storiesOf('Tags', module)
.addDecorator(ThemeDecorator)
.addDecorator(StoryRouter())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can/should this be added globally like the ThemeDecorator is now? (Note the Storybook theme switcher PR has been merged)

added:
- storybook-router-react added as a dev dependency (allows using a router decorator
so that stories for components with Router don't break)

changed:
- Tag is now a routable component
- Make tags clickable in Tags.tsx and SearchSuggestion.tsx
- Update tests
- When clicked, a Tag will link to the search results page for its label
(i.e. /search/?query=tag-name)
@Jskobos Jskobos merged commit d9f1bfa into linode:develop Dec 7, 2018
@Jskobos Jskobos deleted the M3-1988-tag-links branch December 7, 2018 14:24
@coveralls
Copy link

coveralls commented Dec 8, 2018

Coverage Status

Coverage decreased (-0.002%) to 32.299% when pulling f156851 on Jskobos:M3-1988-tag-links into 1af94d4 on linode:develop.

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.

None yet

4 participants