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

Font library: Fix React key prop warnings #57939

Merged
merged 23 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c8072d4
Font Library: add wp_font_face post type and scaffold font face REST …
creativecoder Jan 9, 2024
61da35c
Font Library: create font faces through the REST API (#57702)
creativecoder Jan 11, 2024
42565a3
Refactor Font Family Controller (#57785)
creativecoder Jan 12, 2024
afacdf2
Font Family and Font Face REST API endpoints: better data handling an…
creativecoder Jan 15, 2024
7c82cb9
Font Families REST API endpoint: ensure unique font family slugs (#57…
creativecoder Jan 16, 2024
f84cc6d
Font Library: delete child font faces and font assets when deleting p…
creativecoder Jan 16, 2024
492a3ee
Font Library: refactor client side install functions to work with rev…
jffng Jan 17, 2024
9ebc25f
Cleanup/font library view error handling (#57926)
pbking Jan 17, 2024
92ff955
Fix unique key prop warning when opening modal
mikachan Jan 17, 2024
5b57f3e
Add key props to FontsGrid children
mikachan Jan 17, 2024
8a5efd4
Font Faces endpoint: prevent creating font faces with duplicate setti…
creativecoder Jan 17, 2024
3a739bc
Font Library: Update uninstall/delete on client side (#57932)
mikachan Jan 18, 2024
22253e5
Add slug/id back to FontCollection
mikachan Jan 18, 2024
c646e3d
Change tabsFromCollections inline with Font Collections PR
mikachan Jan 18, 2024
2d3abce
Use child.key for key prop in FontsGrid
mikachan Jan 18, 2024
c6e0fbb
Update packages/edit-site/src/components/global-styles/font-library-m…
mikachan Jan 18, 2024
74be330
Merge branch 'trunk' into try/font-library-refactor
mikachan Jan 18, 2024
a666bb5
Font Library: address JS feedback in #57688 (#57961)
mikachan Jan 18, 2024
32689e1
Font Library REST API endpoints: address initial feedback from featur…
creativecoder Jan 19, 2024
2aa9c64
Font Library: font collection refactor to use the new schema (#57884)
matiasbenedetto Jan 19, 2024
fe2c0ae
Merge branch 'try/font-library-refactor' into font-library/fix-react-…
mikachan Jan 19, 2024
ab889a7
Merge branch 'try/font-library-refactor' into font-library/fix-react-…
mikachan Jan 23, 2024
75c27e5
Remove old WP_REST_Autosave_Fonts_Controller class
mikachan Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ function FontsGrid( { title, children, pageSize = 32 } ) {
<div className="font-library-modal__fonts-grid__main">
{ items.map( ( child, i ) => {
if ( i === itemsLimit - 1 ) {
return <div ref={ setLastItem }>{ child }</div>;
return (
<div key={ child.key } ref={ setLastItem }>
{ child }
</div>
);
}
return child;
return <div key={ child.key }>{ child }</div>;
} ) }
</div>
</VStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

.font-library-modal__font-card {
border: 1px solid #e5e5e5;
width: 100%;
height: auto;
padding: 1rem;
margin-top: -1px; /* To collapse the margin with the previous element */
Expand Down
Loading