Account created on 12 December 2011, over 13 years ago
#

Merge Requests

More

Recent comments

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter
🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter
🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

We sure can. It should already, based on the name, as they fire alphabetically if the weight's not been changed, but we can can also put our thumbs on the scale for good measure (although wouldn't that actually be "bad" measure)?

🇺🇸United States skyriter

The top of the page alert message shows only when the block module is not enabled, per the sitewide_alert.module file:

/**
 * Implements hook_page_top().
 */
function sitewide_alert_page_top(array &$page_top): void {
  // Bail out if block submodule is enabled.
  if (\Drupal::service('module_handler')->moduleExists('sitewide_alert_block')) {
    return;
  }

  $page_top['sitewide_alert'] = \Drupal::service('sitewide_alert.sitewide_alert_renderer')->build();
}

To have the same functionality, we'll need to replicate this in the uswds_alert.module file.

The block module itself only creates a block, as it has 2 files:
- sitewide_alert/modules/sitewide_alert_block/src/Plugin/Block/SitewideAlertBlock.php
- sitewide_alert/modules/sitewide_alert_block/sitewide_alert_block.info.yml

There's nothing here that Drupal itself doesn't provide.

My recommendation is not to require the sitewide_alert_block submodule as a dependency.

🇺🇸United States skyriter

The MR is ready for review.

Here's the current README:
**This is not a functional module yet.** It is under active development under [Contrib First](https://guidebook.civicactions.com/en/latest/common-practices-tools/contribution/contrib-first/).

And here's the help page:
<p><strong>This is not a functional module yet.</strong> It is under active development under <a href="https://guidebook.civicactions.com/en/latest/common-practices-tools/contribution/contrib-first/">Contrib First</a>.</p>

🇺🇸United States skyriter

Requiring message

I agree about Alert Message not being required seems odd. I wouldn't want to make it required, though, given that we're using that pre-existing field, so that we are backwards compatible.

Order of Heading

We should be able to add Heading before Alert Message without issue.

Display order

I think we can still use Weight and only when it's the same as the another weight do we use the Display Order setting. We can add that to the help text for weight Weight.

Configuration

Where the config page shows is set in the routing file. I'd leave it be.

Field name

Given that this is a field on a custom entity type rather than a node, we're only going a conflict if we add another heading field to it.

🇺🇸United States skyriter

I have added configuration and an install file to update the Alert Styles select list.

Here's what it looks like now:

🇺🇸United States skyriter
🇺🇸United States skyriter
🇺🇸United States skyriter

Ok, that makes sense.

🇺🇸United States skyriter

I saw Steve's comment in the Mural document on the complexity of adding an "Alert Type" field and think I understand his counterproposal, but I want to verify here.

If I'm not mistaken, Steve, you're suggesting that we add all of the USWD styles to the "Alert Style" field and forego adding an "Alert Type" field. The implementation would look something like this on the module configuration screen:

For the user creating a sitewide alert, they would see something like the following:

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

For my own clarity, are you thinking that the blocks are as follows:

Sitewide Alert

This is what comes "out of the box" with the sitewide_alert → module.

Sitewide Alert - USWDS Alert

  • Alert - Informative
  • Alert - Warning
  • Alert - Success
  • Alert - Error
  • Alert - Emergency

What about Slim alert?
What about Alert with no icon?

Sitewide Alert - USWDS Site Alert

  • Alert - Informational
  • Alert - Emergency
  • Alert - Emergency with no header
  • Alert - Emergency with list

What about Slim site alert?
What about Site alert with no icon?

Sitewide Alert - Non-USWDS alerts

Why is would this type of alert a part of this module, given its purpose to provide USWDS alerts and site alerts?

🇺🇸United States skyriter

Ok, that makes sense. I just added that requirement in the composer.json.

🇺🇸United States skyriter

Do you think I should close this MR ✨ Add info.yml file Active and combine the work into one?

🇺🇸United States skyriter

While this has been added, it could definitely use some beefing up.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter
🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

Ah, well, you can't exempt it as is not an unknown word but a "forbidden word," cue the scary music, per this https://www.drupal.org/project/drupal/issues/3364292 📌 Use 'queueing' spelling instead of 'queuing' Fixed .

I like the hook update idea. Good thinking.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

Notice: Among other spelling issues, I updated the spelling of "queuing" to "queueing" (the Drupal approved spelling) in the config. I believe I caught them all.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

OK, ESLint is now passing.

🇺🇸United States skyriter

Updated to fix code style issues.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

Updated ESLint issue and also removed jQueryQ.

🇺🇸United States skyriter

Added exception words, as those were the only tripping up CSpell.

🇺🇸United States skyriter

Made fixes to identified errors.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

Updated with some good ole // @phpstan-ignore-next-line

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

skyriter → made their first commit to this issue’s fork.

🇺🇸United States skyriter

I'lll pick this up.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

skyriter → created an issue.

🇺🇸United States skyriter

@jackfoust I posted a patch → on issue 2949540 ✨ Allow specific form ids for clientside validation Needs work for allowing us to exclude forms by form id so that we could use the browser's built-in validation. That is our current work-around.

🇺🇸United States skyriter

Adding the newest patch, after the issues identified by coderdan → were resolved.

This patch removes any mention of webform.

Production build 0.71.5 2024