Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Version Component - Replaced classes by func. comp #129

Merged
merged 9 commits into from
Oct 3, 2019

Conversation

priscilawebdev
Copy link
Contributor

@priscilawebdev priscilawebdev commented Sep 27, 2019

Type: Refactor

The following has been addressed in the PR: https://github.com/verdaccio/ui/issues/116

Unit or Functional tests are included in the PR?

It was not necessary to update the existing ones

Description:

in order to use react hooks, in this PR I updated the Version component by changing it from a class to a functional component. I have also splitted it's content so that it is clearer.

@priscilawebdev priscilawebdev self-assigned this Sep 27, 2019
@priscilawebdev priscilawebdev changed the title Work in progress: Refactor: Replaced classes by func. comp Refactor: Replaced classes by func. comp Sep 27, 2019
@codecov-io
Copy link

codecov-io commented Sep 27, 2019

Codecov Report

Merging #129 into master will increase coverage by 0.01%.
The diff coverage is 88.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #129      +/-   ##
==========================================
+ Coverage   84.12%   84.14%   +0.01%     
==========================================
  Files          92       94       +2     
  Lines         926      927       +1     
  Branches      166      151      -15     
==========================================
+ Hits          779      780       +1     
- Misses        128      132       +4     
+ Partials       19       15       -4
Impacted Files Coverage Δ
src/components/Versions/styles.ts 100% <ø> (ø) ⬆️
src/components/Versions/VersionsTagList.tsx 100% <100%> (ø)
src/components/Versions/VersionsHistoryList.tsx 80% <80%> (ø)
src/components/Versions/Versions.tsx 91.66% <88.88%> (+2.19%) ⬆️
src/components/Header/Header.tsx 89.47% <0%> (ø) ⬆️
src/components/Install/Install.tsx 83.33% <0%> (ø) ⬆️
src/components/DetailSidebar/DetailSidebar.tsx 89.47% <0%> (ø) ⬆️
...mponents/RegistryInfoDialog/RegistryInfoDialog.tsx 66.66% <0%> (ø) ⬆️

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 584f4c1...d8014e1. Read the comment docs.

@priscilawebdev priscilawebdev changed the title Refactor: Replaced classes by func. comp Version Component - Replaced classes by func. comp Sep 27, 2019
@juanpicado juanpicado self-requested a review September 29, 2019 11:32
@@ -14,6 +14,7 @@ export const Spacer = styled('div')({
borderBottom: '1px dotted rgba(0, 0, 0, 0.2)',
whiteSpace: 'nowrap',
height: '0.5em',
margin: '0 16px',
Copy link
Member

Choose a reason for hiding this comment

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

Could you give more context about the margin?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I noticed that there was no space between the Tabs component and the content, so I added 16px margin. Maybe in the future we may have some common spaces, making the application more homogeneous.

@juanpicado juanpicado self-requested a review September 29, 2019 12:20
juanpicado
juanpicado previously approved these changes Sep 29, 2019
Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

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

🚀 really good, short and even increases the coverage 👍

@priscilawebdev priscilawebdev changed the title Version Component - Replaced classes by func. comp Work in Progress: Version Component - Replaced classes by func. comp Sep 30, 2019
@priscilawebdev priscilawebdev changed the title Work in Progress: Version Component - Replaced classes by func. comp Version Component - Replaced classes by func. comp Oct 1, 2019
Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

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

🚀 👍 good job pris

@juanpicado juanpicado merged commit 1d705da into master Oct 3, 2019
@delete-merged-branch delete-merged-branch bot deleted the refactor/116_react_hooks_version_component branch October 3, 2019 08:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants