Problem/Motivation

#3111075: Use small button component for Claro introduced the 'small' button type for paragraph buttons. However, for modal actions a small button is not appropriate since the buttons are now the primary actions.

Proposed resolution

Use small button by default, but not for modal add mode.

Remaining tasks

  1. Write patch
  2. Review
  3. Commit

User interface changes

Paragraph add buttons in the 'Modal' add mode no longer use small buttons.

API changes

None.

Data model changes

None.

Issue fork paragraphs-3262432

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

idebr created an issue. See original summary.

idebr’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new101.39 KB
new104.42 KB
new2.19 KB

Attached changes the appearance of paragraph buttons: Use small button by default, but not for modal add mode.

Before:

After:

gaurav-mathur’s picture

Assigned: Unassigned » gaurav-mathur
gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned
StatusFileSize
new17.41 KB
new16.43 KB

Patch #2 applied successfully on on Drupal 10.0.x-dev and PHP 8.1.6.
The patch work properly for me.
Refer to screenshots.

yashaswi18’s picture

Hi, just wanted to check - is this MR still needed as this is an old issue? Looking at the changes, it removes button--small from the default attributes in ParagraphsWidget.php and conditionally adds it back only when $add_mode !== 'modal', along with the corresponding CSS selector update from .button.button--small to .button in paragraphs.modal.css. The code changes look good as both changes are consistent with each other.

Has this already been addressed elsewhere in the codebase, or is this still the right approach? Please confirm.