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

Specify default JSON:API Extras enhancers link fields globally #17266

Merged
merged 33 commits into from
Mar 14, 2024

Conversation

alexfinnarn
Copy link
Contributor

@alexfinnarn alexfinnarn commented Feb 16, 2024

Description

Closes #17021

Testing done

Manually tested locally and on Tugboat. Added a functional unit test.

Screenshots

Screenshot 2024-02-28 at 12 07 40 PM

QA steps

  1. Log into the site and head to "/admin/config/services/jsonapi/field_types".
    • Confirm that the "link" field type has the "URL for link (link field only)" enhancer applied to it.
    • "Get Absolute Urls" should be unchecked.
  2. Navigate to "/jsonapi/paragraph/react_widget/5663a0dd-a69c-40b7-b50b-526646e32204"
    • Validate that field_default_link has a relative url with a value similar to the uri field's value.
  3. Navigate to "/admin/config/services/jsonapi/field_types", check the "Get Absolute Urls" setting, and save the form.
  4. Navigate to "/jsonapi/paragraph/react_widget/5663a0dd-a69c-40b7-b50b-526646e32204"
    • Validate that field_default_link has an absolute url with a value similar to the uri field's value.
  5. Edit "/admin/config/services/jsonapi/add/resource_types/paragraph/react_widget" to add the "URL for link (link field only)" enhancer to the "field_default_link" field. Make sure to uncheck "Get Absolute Urls".
  6. Navigate to "/jsonapi/paragraph/react_widget/5663a0dd-a69c-40b7-b50b-526646e32204"
    • Validate that field_default_link has a relative url with a value similar to the uri field's value.

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 16, 2024 21:02 Destroyed
@github-actions github-actions bot added Accelerated Publishing CMS Team CMS Product team that manages both editor exp and devops labels Feb 16, 2024
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 16, 2024 21:11 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 16, 2024 21:16 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 19, 2024 18:08 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 21, 2024 18:40 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 22, 2024 17:18 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 23, 2024 20:55 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 23, 2024 21:05 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 23, 2024 21:10 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 23, 2024 21:23 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 27, 2024 16:57 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2024 16:42 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2024 17:19 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2024 20:30 Destroyed
@alexfinnarn alexfinnarn marked this pull request as ready for review February 28, 2024 20:38
@alexfinnarn alexfinnarn requested review from a team as code owners February 28, 2024 20:38
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2024 21:37 Destroyed
tjheffner
tjheffner previously approved these changes Feb 29, 2024
Copy link
Contributor

@tjheffner tjheffner left a comment

Choose a reason for hiding this comment

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

checked:
Screenshot 2024-02-29 at 9 02 54 AM
unchecked:
Screenshot 2024-02-29 at 9 03 09 AM

can still be overridden at a field level per resource type:
Screenshot 2024-02-29 at 10 02 00 AM

@@ -0,0 +1,464 @@
diff --git a/.gitignore b/.gitignore
Copy link
Contributor

Choose a reason for hiding this comment

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

this .gitignore part of the patch, is that just in the module?

also fine with a local patch here, but i think it's probably worthwhile to add it to d.o and reference it that way

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, this is in the d.o. issue MR and patch.

@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 13, 2024 16:46 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 13, 2024 17:15 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 14, 2024 17:14 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 14, 2024 17:15 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 14, 2024 17:17 Destroyed
Copy link
Contributor

@tjheffner tjheffner left a comment

Choose a reason for hiding this comment

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

LGTM, again 😁

Copy link
Contributor

@edmund-dunn edmund-dunn left a comment

Choose a reason for hiding this comment

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

I have no issues with this! Nie work!

@tjheffner tjheffner merged commit a16188f into main Mar 14, 2024
19 checks passed
@tjheffner tjheffner deleted the VACMS-17021-default-field-type-enhancers branch March 14, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accelerated Publishing CMS Team CMS Product team that manages both editor exp and devops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specify default JSON:API Extras enhancers link fields globally
4 participants