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: Deleted fonts are displayed in the active fonts list #55019

Closed
ironprogrammer opened this issue Oct 3, 2023 · 4 comments
Closed
Labels
[Feature] Typography Font and typography-related issues and PRs [Type] Bug An existing feature does not function as intended

Comments

@ironprogrammer
Copy link
Contributor

Description

In latest GB trunk, deleted fonts remain displayed in the active fonts list on the Styles > Typography sidebar. Clicking these fonts seems to present the option to delete them (again), which results in an error. I expect deleted fonts to be removed from the list.

Step-by-step reproduction instructions

  1. With some uploaded fonts installed, open the font management dialog.
  2. Click into a font's variants list and delete the font. (Bonus points: confirm whether the font was deleted from the /wp-content/fonts/ folder.)
  3. Close the font management window and observe the active fonts list.
  4. Click one of the deleted fonts listed and observe that the option to delete still exists.
  5. Delete the font and observe the feedback from the UI.

Screenshots, screen recording, code snippet

Figure 1: Deleted fonts remain visible in Typography sidebar.
deleted fonts remain visible in typography sidebar

Environment info

  • Hardware: MacBook Pro Apple M1 Pro
  • OS: macOS 13.6
  • Browser: Safari 16.6, Google Chrome 117.0.5938.132
  • Server: nginx/1.25.2
  • PHP: 7.4.33
  • WordPress: 6.4-beta2
  • Theme: twentytwentyfour v1.0
  • Active Plugins:
    • gutenberg v16.7.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@ironprogrammer ironprogrammer added [Type] Bug An existing feature does not function as intended [Feature] Typography Font and typography-related issues and PRs labels Oct 3, 2023
@luminuu
Copy link
Member

luminuu commented Jan 10, 2024

From my testing with GB 17.4.1, this seems to have been fixed in the meantime. I had it still happen with an older version of Gutenberg. Ping @mikachan

@mikachan
Copy link
Member

Thanks for testing @luminuu! I've just tested too on the latest version of GB trunk and I'm still seeing the issue. It looks like it's because the font list in the Styles panel is not updated with each font update (e.g. on font deletion). I'll add this to the Font Library tracking issue.

@mikachan
Copy link
Member

Whilst testing something else today, I deleted a font and it immediately disappeared from the active fonts list. I'll keep my eye on this, but perhaps it is fixed! 🤞

@mikachan
Copy link
Member

After further testing, I'm going to close this issue. Please re-open if needed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Typography Font and typography-related issues and PRs [Type] Bug An existing feature does not function as intended
Projects
Status: Done
Status: Done
Development

No branches or pull requests

3 participants