Make WordPress Core

Opened 5 months ago

Last modified 2 months ago

#60716 new enhancement

Font Library: Replace error message "A font face matching those settings already exists" with notice

Reported by: oglekler's profile oglekler Owned by:
Milestone: 6.7 Priority: normal
Severity: normal Version: 6.5
Component: Editor Keywords: has-screenshots needs-patch needs-design-feedback
Focuses: Cc:

Description

If the font already exists, it is not an error, and should not scare the user.

Attachments (3)

2024-03-07_11-25-20.png (50.4 KB) - added by oglekler 5 months ago.
font issue.png (210.3 KB) - added by krupajnanda 5 months ago.
Screenshot 2024-04-09 at 5.42.12 PM.png (560.5 KB) - added by akrocks 4 months ago.
Information Notice Style

Download all attachments as: .zip

Change History (16)

#1 @Presskopp
5 months ago

#60715 was marked as a duplicate.

#2 @krupajnanda
5 months ago

  • Keywords has-screenshots added

Hi @oglekler

I can replicate the mentioned issue on my local where I tried to install the existing font family.

This should not be displayed as an error but it should be prompted as a warning I believe.

Bug Reproduction Report:

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.5-RC2
  • PHP: 8.1.23
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
  • Browser: Chrome 122.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Four 1.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.1.0
    • WordPress Beta Tester 3.5.5

Actual Results

  1. ✅ Error condition occurs (reproduced).

Additional Notes

N/A

Supplemental Artifacts

Please check the attached screenshot here.

#3 @oglekler
5 months ago

  • Summary changed from Font Library:Replace error message "A font face matching those settings already exists" with notice to Font Library: Replace error message "A font face matching those settings already exists" with notice
  • Version set to trunk

#4 @swissspidy
5 months ago

  • Component changed from General to Editor
  • Milestone changed from Awaiting Review to 6.6
  • Type changed from defect (bug) to enhancement

#5 @jorbin
5 months ago

  • Keywords needs-patch added
  • Milestone changed from 6.6 to 6.5.1

This ticket was mentioned in Slack in #core by jorbin. View the logs.


4 months ago

#7 @jorbin
4 months ago

  • Keywords needs-design-feedback added
  • Milestone changed from 6.5.1 to 6.6

I no longer think this makes sense for a minor release, so moving back to 6.6. Also would like the design team to weigh in.

@akrocks
4 months ago

Information Notice Style

#8 @akrocks
4 months ago

Hi @jorbin,
How about using a Notice with info as status?

Somewhat like (Note: For now we can skip the text appearing in image & update it later, once the UI is finalised 😇)
Information Notice Style

Also, as we are going to update the Font upload modal & the code change will be in edit-site package of Gutenberg repo, should I go ahead & create an issue on Gutenberg repo for this (if not already created).

Have already created a draft PR containing error bifurcation (into error/warning/info) logic. We can further update the logic/UI as per the discussion/feedbacks. 😉

PR Link: https://github.com/WordPress/gutenberg/pull/60594

#9 @oglekler
3 months ago

@joedolson what do you think about this notification? I assume it should look as all others and this can be related to #50442

#10 @joedolson
3 months ago

Is there already a standardized notification format in the block and site editor? I don't recall seeing one. Per the conversation on #50442, there are some translation problems with some of the labels we commonly use in English; e.g. 'Success', so the same decisions need to be made here.

But we should use the same basic model for notifications in both systems, so it's the same issue.

But I do agree that this notification should be purely informational. Is there a reason it's not informing the user which font matches those settings? I think it would be much more useful to the user if the notice was something like "[name of font face]" is already in your library with the same settings.

This ticket was mentioned in Slack in #core by oglekler. View the logs.


2 months ago

#12 @UmeshSingla
2 months ago

@oglekler @joedolson

Is there already a standardized notification format in the block and site editor? I don't recall seeing one

Couldn't find one either.

For the ticket, we've following options:

  1. Update the error message only: If we want to modify only the error message it's a quick change in WP_REST_Font_Faces_Controller class and can be easily added.
  1. Update the error type to info: This would require a decent amount of changes and testing since there is no support for info/warning type of notification in the component.

And if we opt for 2nd option, with the first 6.6 beta being so close IMO the ticket should be punted to 6.7.

Last edited 2 months ago by UmeshSingla (previous) (diff)

#13 @audrasjb
2 months ago

  • Milestone changed from 6.6 to 6.7

Moving this enhancement to milestone 6.7 as there is still no patch available for review and beta 1 is tomorrow.

Note: See TracTickets for help on using tickets.