Resolve "When page parameters change, the table link fields pointing to that page are not updated properly"
requested to merge 2298-when-page-parameters-change-the-table-link-fields-pointing-to-that-page-are-not-updated into develop
What is in this MR
This merge request ensures that in both LinkElement
and LinkField
, when a destination page's parameters change, an error message appears asking the page designer to update the link's parameters.
Improvements have also been made to inform the designer where the error is:
-
TableElementType
now implementsisInError
, which iterates over its fields, detecting if any are in error. -
CollectionFieldType
now implementsisInError
too, which onlyLinkCollectionFieldType
will use. If it detects that its own parameters are in error, it'll return true.
The result is that per TableElement
field, we can see if links are invalid when the field is collapsed.
How to test this MR
- Add a
LinkElement
to the page.- Set its navigation type to a page (
destinationPage
) with one or more parameters.
- Set its navigation type to a page (
- Add a
TableElement
to the page.- Add a field of type
link
.- Set its navigation type to a page (
destinationPage
) with one or more parameters.
- Set its navigation type to a page (
- Add a field of type
- Modify
destinationPage
so that its page parameter is different. - Both
LinkElement
andTableElement
should have a warning circle in the preview editor. - In
LinkElementForm
the "The saved parameters don't match" error box should be visible. - In
TableElementForm
the "The saved parameters don't match" error box should be visible in the relevant field.
Merge Request Checklist
-
changelog.md has been updated if required. -
New/updated Premium/Enterprise features are separated correctly in the premium or enterprise folder -
The latest Chrome and Firefox have been used to test any new frontend features -
Documentation has been updated -
Quality Standards are met -
Performance: tables are still fast with 100k+ rows, 100+ field tables -
The redoc API pages have been updated for any REST API changes -
Our custom API docs are updated for changes to endpoints accessed via api tokens -
The UI/UX has been updated following UI Style Guide
Closes #2298 (closed)
Edited by Peter Evans