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

VersionChooser can now select versions #391

Merged
merged 3 commits into from
Mar 19, 2019
Merged

VersionChooser can now select versions #391

merged 3 commits into from
Mar 19, 2019

Conversation

willdurand
Copy link
Member

@willdurand willdurand commented Mar 13, 2019

Fixes #321
⚠️ depends on #385

I believe this also fixes #111 🏆


This PR adds the logic to change versions in VersionChooser. It also ensures version order is correct (old < new). I did it in the VersionChooser component because it would add too much logic into the Compare component, but I can move everything in one place (I would understand that we want to keep the same logic in a unique file).

Only the last commit is relevant.

Gif

2019-03-14 15 16 34

@willdurand willdurand changed the base branch from render-diff to master March 13, 2019 15:35
@willdurand willdurand marked this pull request as ready for review March 13, 2019 17:58
@willdurand
Copy link
Member Author

This is working but the storybook has an issue and I don't really know how to fix it yet: the component receives router props with empty match.params. I tried to pass the params directly but it does not work. It's the first time we have such an issue because it's the first time we render a component that depends on the routing layer in Storybook. 😿

@willdurand
Copy link
Member Author

rebased!

@codecov-io
Copy link

codecov-io commented Mar 13, 2019

Codecov Report

Merging #391 into master will decrease coverage by 0.09%.
The diff coverage is 93.75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #391     +/-   ##
=========================================
- Coverage   97.17%   97.08%   -0.1%     
=========================================
  Files          35       35             
  Lines         673      686     +13     
  Branches      152      152             
=========================================
+ Hits          654      666     +12     
- Misses         18       19      +1     
  Partials        1        1
Impacted Files Coverage Δ
src/pages/Compare/index.tsx 100% <ø> (ø) ⬆️
src/components/VersionSelect/index.tsx 100% <100%> (ø) ⬆️
src/components/VersionChooser/index.tsx 100% <100%> (ø) ⬆️
src/test-helpers.tsx 98.11% <66.66%> (-1.89%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4bfd9f...33a1ce4. Read the comment docs.

Copy link
Contributor

@kumar303 kumar303 left a comment

Choose a reason for hiding this comment

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

It's cool to see this come together! I'll do a proper review when the others have landed.

stories/VersionChooser.stories.tsx Outdated Show resolved Hide resolved
src/components/VersionChooser/index.tsx Outdated Show resolved Hide resolved
src/components/VersionSelect/index.tsx Outdated Show resolved Hide resolved
@willdurand
Copy link
Member Author

This is ready for a review :)

@willdurand willdurand force-pushed the version-chooser branch 2 times, most recently from 2c9e35a to 939b6d4 Compare March 15, 2019 09:42
@willdurand
Copy link
Member Author

I know it looks broken but it actually works :D Circle-CI isn't configured yet.

@willdurand
Copy link
Member Author

Rebased!

Copy link
Contributor

@kumar303 kumar303 left a comment

Choose a reason for hiding this comment

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

Just a partial review amidst morning interruptions...

stories/VersionChooser.stories.tsx Outdated Show resolved Hide resolved
src/components/VersionChooser/index.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@kumar303 kumar303 left a comment

Choose a reason for hiding this comment

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

r+wc

src/components/VersionChooser/index.spec.tsx Outdated Show resolved Hide resolved
src/components/VersionSelect/index.tsx Show resolved Hide resolved
@willdurand willdurand merged commit 03e7b39 into master Mar 19, 2019
@willdurand willdurand deleted the version-chooser branch March 19, 2019 08:43
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.

Fetch a diff of two versions when a version is selected in the VersionChooser View diff between two versions
3 participants