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

Setup LinkBlock to handle multiple types of links #11954

Merged
merged 25 commits into from
Mar 6, 2024

Conversation

jhonatan-lopes
Copy link
Contributor

@jhonatan-lopes jhonatan-lopes commented Feb 29, 2024

Description

⚠️ Please disable preboot for the deployment of this feature! ⚠️

Setup wagtail-link-block with a custom LinkBlock to handle multiple types of links:

  • Pages
  • Documents
  • External/relative URLs
  • Anchor links
  • Mail to
  • Phone

Old LinkButton interface (doesn't allow mailto: links):

image

New interface:

image

Link to sample test page:
Related PRs/issues: #11875

Checklist

Tests

  • Is the code I'm adding covered by tests?

Changes in Models:

  • Did I update or add new fake data?
  • Did I squash my migration?
  • Are my changes backward-compatible. If not, did I schedule a deploy with the rest of the team?

Documentation:

  • Is my code documented?
  • Did I update the READMEs or wagtail documentation?

Merge Method
💡❗Remember to use squash merge when merging non-feature branches into main

┆Issue is synchronized with this Jira Story

@jhonatan-lopes jhonatan-lopes marked this pull request as draft February 29, 2024 12:52
@jhonatan-lopes jhonatan-lopes marked this pull request as ready for review February 29, 2024 16:53
Copy link
Collaborator

@mmmavis mmmavis left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks @jhonatan-lopes !

@jhonatan-lopes jhonatan-lopes merged commit c7e3ba2 into main Mar 6, 2024
6 checks passed
@jhonatan-lopes jhonatan-lopes deleted the feature/11875-mozfest-cta-mailto-links branch March 6, 2024 13:51
@TheoChevalier
Copy link
Contributor

Hi @jhonatan-lopes, I noticed this PR introduces new strings in network-api/networkapi/wagtailpages/factory/customblocks/link_block.py, before I expose them in Pontoon, I wanted to check whether actually translating these strings would be helpful for these tests, and if not, whether we should hardcode the strings, or even maybe exclude all test folders from the makemessages command?

@jhonatan-lopes
Copy link
Contributor Author

Hey @TheoChevalier, don't bother exposing them to Pontoon just yet. These strings are only used on the admin interface so there's no need for localisation (or a lower priority need). The tests need it because the wagtail-link-block library makes use of it. In any case, I think I'll need to remove that library before it goes to prod because it is not entirely compatible with how I need to setup links on the new navigation work.

So, moving forward I'll either remove those strings (by removing the library) or I'll try to exclude the test folders from the makemessages command

@jhonatan-lopes jhonatan-lopes added the deployment blocker ✋🛑🚫⛔️ Apply this issues that need to be resolved before the next production deployment. label Mar 8, 2024
@jhonatan-lopes jhonatan-lopes mentioned this pull request Mar 11, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployment blocker ✋🛑🚫⛔️ Apply this issues that need to be resolved before the next production deployment. run visual regression tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants