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

Add Validation Summary component to edit template forms. #2028

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

amazingphilippe
Copy link
Contributor

@amazingphilippe amazingphilippe commented Jan 2, 2025

Summary | Résumé

The add-template page has gotten a bit long recently with the introduction of template categories. Suggesting we incorporate the validation summary component to highlight missing fields or errors.

Test instructions | Instructions pour tester la modification

  1. Create a new template (sms or email)
  2. Submit form without filling in the form
  3. Receive a validation summary

After: We can see all the errors even if not in view.
Capture d’écran, le 2025-01-03 à 08 41 00
Capture d’écran, le 2025-01-03 à 08 42 12

Copy link

github-actions bot commented Jan 2, 2025

@amazingphilippe amazingphilippe changed the title Validation summary on edit template. Edit template guidance and IA Jan 3, 2025
@amazingphilippe amazingphilippe changed the title Edit template guidance and IA Add Validation Summary component to edit template forms. Jan 6, 2025
Copy link
Contributor

@smcmurtry smcmurtry left a comment

Choose a reason for hiding this comment

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

I tested this in the review app and it seems to be working. Nicely done!

You included a few code formatting changes - you can leave them in this PR but in the future you could try to avoid that.

Comment on lines +30 to +34
description=_("You can put double brackets around a variable to insert custom content."),
link_url=gca_url_for('personalisation_guide'),
link_text=_("Guide: Send messages with custom content"),
icon="arrow-up-right-from-square"
) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like a code formatting change?

Comment on lines +62 to +68
{{ select(
form.template_category_id,
hint=_('Template categories help improve delivery of your messages'),
option_hints=template_category_hints, option_conditionals=other_category,
testid="template-categories",
use_aria_labelledby=false
) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's best to avoid including code formatting changes that are unrelated to the actual change you are trying to make, since it makes the PR bigger than it needs to be. But maybe your editor is just doing this on its own?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I had to undo an earlier change as the AC for this story was changed a bit. And I couldn't quite get that section back to what it was exactly. And I'm also having some auto-formatting issues as well on html files... Maybe we should see if we can fix that at the container level by adding the correct extensions.

@amazingphilippe amazingphilippe merged commit c89bbb4 into main Jan 6, 2025
11 checks passed
@amazingphilippe amazingphilippe deleted the debt/template-validation-summary branch January 6, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants