Problem/Motivation

The twig file https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/themes/olivero/templates/datetime-wrapper.html.twig need to be refactored as https://www.drupal.org/node/3010558 is fixed.

Proposed resolution

add `font-weight: bold;` for `.form-item__error-message`

CommentFileSizeAuthor
#2 3333172-2.patch1.42 KBgauravvvv

Issue fork drupal-3333172

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Gauravvv created an issue. See original summary.

gauravvvv’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB

I have attached the patch, Please review.

gauravvvv’s picture

Issue summary: View changes
gauravvvv’s picture

Issue summary: View changes
markconroy’s picture

Hi @Gauravvv

The issue summary says the "twig file needs to be refacored", but this patch only contains CSS changes and removing the todo from the twig file doc block.

Is there any refactoring of the actual twig file needed?

gauravvvv’s picture

The issue summary says the "twig file needs to be refacored", but this patch only contains CSS changes and removing the todo from the twig file doc block.

@markconroy As https://www.drupal.org/node/3010558 is fixed.

So I have removed the todo comment from the twig file. And added the required CSS on form-item__error-message class. As suggested in parent issue.

markconroy’s picture

Thanks @Gauravvv

Adding bold to the CSS for errors, means that the full error message will be bold. Is that the desired outcome? Or do we want only items with a strong tag in the error message to be bold?

gauravvvv’s picture

Adding bold to the CSS for errors, means that the full error message will be bold. Is that the desired outcome? Or do we want only items with a strong tag in the error message to be bold?

Yes @markconroy, Same we have done in the parent issue 3010558: Unnecessary element in Umami's form-element template may produce invalid markup.

<strong> may produce invalid markup. To avoid that we're adding bold to the CSS for errors.

markconroy’s picture

<strong> may produce invalid markup. To avoid that we're adding bold to the CSS for errors.

Yes, but do we want the FULL error message to be in bold? If the error message is:

The following fields must be filled in: title, email, and phone number.

How can we show bold to only the words "title", "email", and "phone" if we have the full message set to use "bold".

If that's the desired result, then we can mark this RTBC.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs screenshots

Think since the .css file has changed that before/after screenshots should be added to the issue summary to show nothing broke.

pradipmodh13’s picture

Hello @smustgrave,
Can you please share steps to check this error message.
It will easy for me to share screenshot with After and before.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Mithun S made their first commit to this issue’s fork.

mithun s’s picture

Observed that all the strong tags in the files are removed, the css of bold for the error message is missing for 11.x. Added the required css and raised a new PR against 11.x branch. Please review.

mithun s’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Issue summary is incomplete. See tags

mithun s’s picture

Title: Olivero: Refactor datetime-wrapper.html.twig » Olivero: Refactor the css for bold error message on removal of strong tag.

Updating the issue summary for the issue.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.