CRUD icon indicating copy to clipboard operation
CRUD copied to clipboard

Put action name in heading

Open pekka opened this issue 2 years ago • 3 comments

WHY

See #4901

BEFORE - What was wrong? What was happening before this PR?

The "create" and "edit" pages had their headings set to the model plural (e.g. "Monsters") and the subheading to the current action (e.g. "create new monster").

image

AFTER - What is happening after this PR?

  • The heading will be set to the current action (unless something is set in $crud->getHeading())
  • The subheading will be empty by default, unless something is set in $crud->getSubheading()

HOW

Switched the placeholders in the template code

Is it a breaking change?

No

How can we test the before & after?

Create or edit any model

pekka avatar Jan 19 '23 10:01 pekka

The inspection completed: No new issues

scrutinizer-notifier avatar Jan 19 '23 10:01 scrutinizer-notifier

Hello @pekka thanks for the PR and the explanation 🙏

I agree with some of your arguments:

  • It's better to read Edit Monsters than Monsters Edit Monsters for screen readers.
  • Monsters Edit Monsters is redundant, indeed.

What I don't like is that Edit word in this PR has the same emphasis as the "heading" of the page.

To fix the above mentioned issues should we just get rid of the monsters word in the subheading, making it only: Monsters Edit ?

Would that still be an issue for screen readers ? Redundancy is removed so maybe that works ?

@tabacitu what do you think ?

Cheers

pxpm avatar Jan 19 '23 16:01 pxpm

To fix the above mentioned issues should we just get rid of the monsters word in the subheading, making it only: Monsters Edit ? Would that still be an issue for screen readers ? Redundancy is removed so maybe that works ?

Personally, I think describing the current operation in plain text would work best! But, your decision, and trivially easy to customize anyway 👍
I can amend the PR once it's decided.

pekka avatar Jan 19 '23 18:01 pekka

Hey @pekka 10 years later ... 🫨

This PR as is I think will not get merged, but I like the idea myself.

I thought about a solution for this here: #5566 not sure if it's a good idea or not. If you have an opinion about it, let me know 🤷‍♂️

Thanks again for taking time to submit the PR 🙏

pxpm avatar Jul 17 '24 14:07 pxpm