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

UHF-9950 Preview on new translations #287

Merged
merged 1 commit into from
Jun 20, 2024
Merged

UHF-9950 Preview on new translations #287

merged 1 commit into from
Jun 20, 2024

Conversation

khalima
Copy link
Contributor

@khalima khalima commented Jun 20, 2024

UHF-9950

What was done

  • Don't show a preview button for new node translations.
    • When the user clicks the preview button for a new node or a new translation, any paragraphs or other entity references have not yet been saved/created. This is a problem in preview as the preview tries to load the entities or their revisions. It's easier to hide the Preview button for this kind of niche user behaviour than to build an entire function to display unsaved entities.

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT Admin theme
    • composer require drupal/hdbt_admin:dev-UHF-9950
  • Run make drush-cr

How to test

  • Create a landing page with hero paragraph and save the landing page
  • Create a new translation for the landing page and check that there is no "Preview" button on the node translation form.
  • Check that code follows our standards

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

Translations

  • Translations have been added to .po -files and included in this PR

Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

This works very well 🦖

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