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
Fixes #36050 - DiffRadioButtons PF4 Refactor #9615
Fixes #36050 - DiffRadioButtons PF4 Refactor #9615
Conversation
Can one of the admins verify this patch? |
2 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Issues: #36050 |
f20e008
to
ef969fb
Compare
ef969fb
to
e7117ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank Lior, works well!
needs some css adjustments so there will be equal space between the toggle group, the divider, and the revert button.
We're trying to move away from snapshot testing, can you make a small react testing library test for this instead?
webpack/assets/javascripts/react_app/components/DiffView/DiffToggle.js
Outdated
Show resolved
Hide resolved
webpack/assets/javascripts/react_app/components/DiffView/diffview.scss
Outdated
Show resolved
Hide resolved
Sure, I'll update you when it's ready 👍🏼 |
e7117ce
to
d740f6e
Compare
d740f6e
to
7c9e5e0
Compare
Regarding the css adjustments you mentioned, I think now there is an equal space between the elements, wouldn't mind another eye taking a look 😶🌫️ |
7c9e5e0
to
3774bf5
Compare
@MariaAga I am working on the DiffContainer test (which broke because it used enzime). UPDATE |
7cb6a22
to
b801c3a
Compare
76a0bc5
to
7ed2bdb
Compare
webpack/assets/javascripts/react_app/components/DiffView/DiffConsts.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in report_templates
and audits
and it looks good, just needs a few code changes
this.setState({ viewType }); | ||
} | ||
const DiffContainer = ({ patch, oldText, newText, className }) => { | ||
const [viewType, setViewType] = useState(SPLIT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice refactor!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @MariaAga :)
webpack/assets/javascripts/react_app/components/DiffView/DiffContainer.test.js
Outdated
Show resolved
Hide resolved
|
||
|
||
// unmnount the component from the DOM | ||
unmount(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🙏🏼
7d2c9d3
to
4f6bac0
Compare
00367f2
to
1a0a440
Compare
1a0a440
to
ae40b7b
Compare
4e31ce7
to
ae40b7b
Compare
ae40b7b
to
c6e4048
Compare
c6e4048
to
c208b36
Compare
Removed any unrelated snapshot updates 👍🏼 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactor!
Screenshots: