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

Hot Fix: multi-form goal block breaks from filter/form settings #7069

Merged
merged 22 commits into from
Oct 25, 2023

Conversation

glaubersilva
Copy link
Contributor

@glaubersilva glaubersilva commented Oct 24, 2023

Resolves #7068 and #6228 and #7070

Description

The main thing that this PR fixes is the "This block has encountered an error, and can not be previewed" error message displayed on the multi-form goal block when we try to filter the forms that should be used in the progress bar of the block.

The problem was happening because Gutenberg provides its own versions of React and ReactDOM. So, we have to tell third-party libraries about those versions by mapping the package names to the global variables available in the block editor.

Reference: JedWatson/react-select#4893 (comment)

This PR also fixes a problem related to the form titles in the multi-select dropdown, it was displaying – instead of - in the form titles that contain this character.

This PR also fixes a bug that prevents a few shortcodes from respecting their own "ids" attribute, like for example these ones:

[give_multi_form_goal ids="931"]

[give_form_grid ids="931"]

[give_totals ids="931" message="Thanks to you, we’ve raised {total} across all our congregations combined! Let's keep it up!" progress_bar="false"]

Affects

Multi-Form Goal Block > Progress Bar > Filters

Visuals

title-raw

Testing Instructions

  1. Create a new page;
  2. Add the multi-form goal block;
  3. Click on the progress bar;
  4. On the right side, click on Filters and Filter by form;
  5. No more errors should be displayed.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@glaubersilva glaubersilva changed the title Hotfix/multi form goal block filters 7068 Hot Fix: multi-form goal block breaks from filter/form settings Oct 24, 2023
@glaubersilva glaubersilva self-assigned this Oct 24, 2023
@glaubersilva glaubersilva marked this pull request as ready for review October 24, 2023 21:56
Copy link
Contributor

@JoshuaHungDinh JoshuaHungDinh left a comment

Choose a reason for hiding this comment

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

Tested & working. Nice - I never found any supporting documentation for using externals.

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests

pauloiankoski and others added 21 commits October 25, 2023 15:17
… reference for _give_redirect_form_id to prevent warnings on PHP 8.0.1 or plus
… reference for _give_redirect_form_id to prevent warnings on PHP 8.0.1 or plus
… reference for _give_redirect_form_id to prevent warnings on PHP 8.0.1 or plus
@JasonTheAdams JasonTheAdams force-pushed the hotfix/multi-form-goal-block-filters-7068 branch from c08d659 to 8509651 Compare October 25, 2023 21:24
@JasonTheAdams JasonTheAdams changed the base branch from master to develop October 25, 2023 21:24
@JasonTheAdams JasonTheAdams merged commit 19f258b into develop Oct 25, 2023
20 checks passed
@JasonTheAdams JasonTheAdams deleted the hotfix/multi-form-goal-block-filters-7068 branch October 25, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants