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

YALB-1428: Bug: Action Banner Field Labels #402

Merged
merged 2 commits into from
Aug 30, 2023

Conversation

dblanken-yale
Copy link
Contributor

@dblanken-yale dblanken-yale commented Aug 25, 2023

YALB-1428: Bug: Action Banner Field Labels

Description of work

  • Rename CTA Banner Heading label to Action Banner Heading
  • Rename CTA Banner Content label to Action Banner Content
  • Rename Link heading for the link widget to Call-to-action

Functional testing steps:

  • Attempt to add an action banner to a page
  • Verify that the form displays the renamed labels for the fields (No CTA should be present in the labels)
  • Verify that the overall heading of the Link section is now Call-to-action

@dblanken-yale
Copy link
Contributor Author

Again, created this with don't merge until the node access fix can be pulled in.

@github-actions
Copy link

Visit Site

Created multidev environment pr-402 for yalesites-platform.

@dblanken-yale dblanken-yale force-pushed the YALB-1428-bug-action-banner-field-labels branch 2 times, most recently from cff3c8a to e182752 Compare August 25, 2023 19:59
@dblanken-yale dblanken-yale marked this pull request as ready for review August 25, 2023 20:03
@github-actions
Copy link

Visit Site

Created multidev environment pr-402 for yalesites-platform.

Copy link
Contributor

@codechefmarc codechefmarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as described. However, I wanted to point out that this is also changing the "link text" to "Call-to-action text" on other components too - Grand Hero and Content Spotlight were the ones I checked. If this is cool, then that's fine. But, if not, we may want to get more specific (if we can?) to target just the Action Banner.

@dblanken-yale
Copy link
Contributor Author

Boo! I checked some that had links and they didn’t change but it did seem odd that it didn’t given my code. Thanks for checking. I’ll see what I can do to distinguish.

Copy link
Contributor

@miketullo95 miketullo95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great! 👍

@miketullo95
Copy link
Contributor

oh i just saw the note on distinguishing, if its going to be a lot of custom code to do so, I would say keeping the "call to action" link label but reverting the changes to the specific link text as "call to action text" since its effecting other components
@dblanken-yale

@dblanken-yale
Copy link
Contributor Author

@miketullo95 Ah ok. Well, let me bring it up in stand up today to see if there's something I'm missing, but if no one knows, maybe that can be a ticket for later? I am able to use a hook to get the block type, and I am able to use a hook to get the label, but I'm having trouble being able to retrieve both in order to ONLY change the action banner version. :(

@dblanken-yale
Copy link
Contributor Author

@codechefmarc @miketullo95 I think I was able to finally target it with hook_field_widget_complete_form_alter. If you two wouldn't mind giving it another check, I'd appreciate it. It should now only target cta_banner items.

@dblanken-yale dblanken-yale force-pushed the YALB-1428-bug-action-banner-field-labels branch from e39ad8b to b6bcfbb Compare August 28, 2023 15:52
@dblanken-yale
Copy link
Contributor Author

Well, when it's done building that is. :D

Copy link
Contributor

@miketullo95 miketullo95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it works! amazing job

Copy link
Contributor

@codechefmarc codechefmarc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, also tested on other components and site settings, etc, and it only shows on the action banner. Nice hook find - I wasn't aware of that one. Approved!

Rename CTA Banner heading and content to Action Banner for consistency.
@dblanken-yale dblanken-yale force-pushed the YALB-1428-bug-action-banner-field-labels branch from ec7e588 to b1d7c5b Compare August 30, 2023 17:19
@dblanken-yale dblanken-yale merged commit 01dcf43 into develop Aug 30, 2023
3 checks passed
@dblanken-yale dblanken-yale deleted the YALB-1428-bug-action-banner-field-labels branch August 30, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants