-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
[Content manager] Refactor edit view #14881
Conversation
Codecov ReportBase: 59.61% // Head: 59.68% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #14881 +/- ##
==========================================
+ Coverage 59.61% 59.68% +0.06%
==========================================
Files 1340 1342 +2
Lines 32639 32629 -10
Branches 6225 6224 -1
==========================================
+ Hits 19459 19473 +14
+ Misses 11316 11293 -23
+ Partials 1864 1863 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
); | ||
})} | ||
{row.map((grid, gridRowIndex) => ( | ||
<GridRow grid={grid} key={gridRowIndex} /> |
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.
What do you think about renaming grid
to columns
? I think if I'd look at the GridRow
component it would be easier to understand ...
packages/core/admin/admin/src/content-manager/pages/EditView/index.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.
Great work @markkaylor ⭐
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 taking the time to improve the codebase 🙂
packages/core/admin/admin/src/content-manager/pages/EditView/index.js
Outdated
Show resolved
Hide resolved
options: PropTypes.object.isRequired, | ||
attributes: PropTypes.object.isRequired, | ||
}).isRequired, | ||
}).isRequired, | ||
id: PropTypes.string, | ||
isSingleType: PropTypes.bool, | ||
goBack: PropTypes.func.isRequired, |
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.
I can't comment below this line, but I think you can remove the commented code at the very end of the file. Also I don't think the named export is used anywhere
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.
Oh sorry I forgot, will update now
packages/core/admin/admin/src/content-manager/pages/EditView/utils/createAttributesLayout.js
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.
⭐
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.
This brings me a lot of joy 🙇🏼♀️
What does it do?
for...of
loop withforEach
to avoid eslint warning. I also decided to move all the logic inside the createAttributeLayout function.layout
withuseSelector
Why is it needed?
How to test it?