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

Commits on Jan 12, 2024

  1. Configuration menu
    Copy the full SHA
    c8072d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    61da35c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    42565a3 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2024

  1. Configuration menu
    Copy the full SHA
    afacdf2 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Configuration menu
    Copy the full SHA
    7c82cb9 View commit details
    Browse the repository at this point in the history
  2. Font Library: delete child font faces and font assets when deleting p…

    …arent (#57867)
    
    Co-authored-by: Sarah Norris <1645628+mikachan@users.noreply.github.com>
    creativecoder and mikachan authored Jan 16, 2024
    Configuration menu
    Copy the full SHA
    f84cc6d View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. Font Library: refactor client side install functions to work with rev…

    …ised API (#57844)
    
    * Add batchInstallFontFaces function and related plumbing.
    
    * Fix resolver name.
    
    * Add embedding and rebuild theme.json settings for fontFamily.
    
    * Handle responses directly, add to collection before activating. Remove unused test.
    
    * Remove getIntersectingFontFaces.
    
    * Check for existing font family before installing.
    
    * Reference src, not uploadedFile key.
    
    Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
    
    * Check for existing font family using GET /font-families?slug=.
    
    * Filter already installed font faces (determined by matching fontWeight AND fontStyle)
    
    ---------
    
    Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
    Co-authored-by: Jason Crist <jcrist@pbking.com>
    3 people authored Jan 17, 2024
    Configuration menu
    Copy the full SHA
    492a3ee View commit details
    Browse the repository at this point in the history
  2. Cleanup/font library view error handling (#57926)

    * Add batchInstallFontFaces function and related plumbing.
    
    * Fix resolver name.
    
    * Add embedding and rebuild theme.json settings for fontFamily.
    
    * Handle responses directly, add to collection before activating. Remove unused test.
    
    * Remove getIntersectingFontFaces.
    
    * Check for existing font family before installing.
    
    * Reference src, not uploadedFile key.
    
    Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
    
    * Check for existing font family using GET /font-families?slug=.
    
    * Filter already installed font faces (determined by matching fontWeight AND fontStyle)
    
    * moved response processing into the resolver for fetchGetFontFamilyBySlug
    
    * Moved response processing for font family installation to the resolver
    
    * Refactored font face installation process to handle errors more cleanly
    
    * Cleanup error handling for font library view
    
    * Add i18n function to error messages
    
    * Add TODO comment for uninstall notice
    
    ---------
    
    Co-authored-by: Jeff Ong <jonger4@gmail.com>
    Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com>
    Co-authored-by: Sarah Norris <sarah@sekai.co.uk>
    4 people authored Jan 17, 2024
    Configuration menu
    Copy the full SHA
    9ebc25f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    92ff955 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5b57f3e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8a5efd4 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2024

  1. Font Library: Update uninstall/delete on client side (#57932)

    * Fix delete endpoint
    
    * Update fetchUninstallFontFamily to match new format
    
    * Update uninstallFont
    
    * Add uninstall notice back in
    
    * Tidy up comments
    
    * Re-word uninstall notices
    
    * Add spacing to error message
    
    * Refactored how font family values were processed so they would retain their id, which is now used to delete a font family without fetching data via slug
    
    * Rename uninstallFont to uninstallFontFamily
    
    * Throw uninstall errors rather than returning them
    
    ---------
    
    Co-authored-by: Jason Crist <jcrist@pbking.com>
    mikachan and pbking authored Jan 18, 2024
    Configuration menu
    Copy the full SHA
    3a739bc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22253e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c646e3d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2d3abce View commit details
    Browse the repository at this point in the history
  5. Update packages/edit-site/src/components/global-styles/font-library-m…

    …odal/local-fonts.js
    
    Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com>
    mikachan and spacedmonkey authored Jan 18, 2024
    Configuration menu
    Copy the full SHA
    c6e0fbb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    74be330 View commit details
    Browse the repository at this point in the history
  7. Font Library: address JS feedback in #57688 (#57961)

    * Wrap error messages in sprintf
    
    * Use await rather than then
    
    * Add variables for API URLs
    
    * Update packages/edit-site/src/components/global-styles/font-library-modal/resolvers.js
    
    Co-authored-by: Jeff Ong <jonger4@gmail.com>
    
    ---------
    
    Co-authored-by: Jeff Ong <jonger4@gmail.com>
    mikachan and jffng authored Jan 18, 2024
    Configuration menu
    Copy the full SHA
    a666bb5 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2024

  1. Configuration menu
    Copy the full SHA
    32689e1 View commit details
    Browse the repository at this point in the history
  2. Font Library: font collection refactor to use the new schema (#57884)

    * google fonts collection data provisional url
    
    * rename controller methods
    
    * fix get_items parameters
    
    * fix endpoint return
    
    * rafactor font collection class
    
    * fix tests for the refactored class
    
    * refactor font collections rest controller
    
    * update font collection tests
    
    * update the frontend to use the new endpoint data schema
    
    * format php
    
    * adding linter line ignore rul
    
    * replacing throwing an exception by calling doing_it_wrong
    
    * add translation marks
    
    Co-authored-by: Jeff Ong <jonger4@gmail.com>
    
    * user ternary operator
    
    * correct translation formatting and comments
    
    * renaming function
    
    * renaming tests
    
    * improve url matching
    
    Co-authored-by: Grant Kinney <creativecoder@users.noreply.github.com>
    
    * return error without rest_ensure_response
    
    * fix contradictory if condition
    
    ---------
    
    Co-authored-by: Jeff Ong <jonger4@gmail.com>
    Co-authored-by: Grant Kinney <creativecoder@users.noreply.github.com>
    3 people authored Jan 19, 2024
    Configuration menu
    Copy the full SHA
    2aa9c64 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fe2c0ae View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2024

  1. Merge branch 'try/font-library-refactor' into font-library/fix-react-…

    …warnings
    
    # Conflicts:
    #	lib/experimental/fonts/font-library/font-library.php
    #	lib/load.php
    #	packages/edit-site/src/components/global-styles/font-library-modal/context.js
    #	packages/edit-site/src/components/global-styles/font-library-modal/utils/index.js
    #	phpunit/tests/fonts/font-library/wpRestFontFacesController.php
    #	phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php
    mikachan committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    ab889a7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    75c27e5 View commit details
    Browse the repository at this point in the history