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

Issue 482 fix event display #350

Merged
merged 14 commits into from
Mar 25, 2025
Merged

Issue 482 fix event display #350

merged 14 commits into from
Mar 25, 2025

Conversation

mariacha
Copy link
Collaborator

@mariacha mariacha commented Feb 5, 2025

What issue(s) does this solve?

What is the new behavior?

  • Changes a largely-hard-coded DSField for the Add To Calendar button into a field that uses configuration options borrowed from the AddToCalendar widget.
  • Creates a Calculated field that just returns whatever value is in the Date/Time field (so I can display the same field twice).

Profile requirements:

  • Does deploying this change require a change to config at the site level (choose one)?
    • No config change is required.
    • Yes, and I have written an update hook to apply these config changes.
    • Yes, and I've included updating instructions to be added to the release notes. The next release will need to be a major version increase. (Only do this in special cases.)

Site-level pull requests for testing. Only merge when these PRs are approved:

Create or update any site-level pull requests following the documentation

Checked on develop (TA to do)

  • Brasil
  • China
  • Indonesia

@unclegcb
Copy link
Contributor

@mariacha since you are the original creator I can't ask you to code review, but this is assigned to you!

Copy link
Collaborator Author

@mariacha mariacha left a comment

Choose a reason for hiding this comment

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

@unclegcb do you have time to make a few more changes here? I found two suggestions, hopefully small

entity_type: node
bundle: event
label: 'Calendar Description'
description: ''
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Let's give this a more helpful description:

The event description in the "Add to Calendar" link. Default value is "[node:title] - from WRI: [node:url:absolute]"

(you'll have to html encode the brackets so they look right and can be copy/pasted)


// Attach the fields to the Event node.
\Drupal::service('distro_helper.updates')
->installConfig('field.field.node.event.field_calendar_description', 'wri_event', 'install', 'TRUE');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since we're still using the old-fashioned pantheon commands drush updb then drush cim this new field is getting deleted and re-created post-update. Can you update Distro helper to call the syncUUIDs command right before the config gets auto-exported here? Then open a new branch and we'll test it out on this repo.

@mariacha mariacha merged commit 350e349 into main Mar 25, 2025
1 check passed
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.

3 participants