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

Enable morphing for turbo drive #17296

Draft
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

ulferts
Copy link
Contributor

@ulferts ulferts commented Nov 28, 2024

Ticket

https://community.openproject.org/wp/59779

What are you trying to accomplish?

Enable morphing with TurboDrive without breaking functionality.

What approach did you choose and why?

  • Add the necessary headers that
    • Enable morphing
    • Keep the scroll position
  • Exempt the top menu and various angular components from being morphed.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@ulferts ulferts changed the title enable morphing for turbo drive - hacky Enable morphing for turbo drive Nov 28, 2024
@ulferts ulferts force-pushed the code-maintenance/59779-enable-morphing-for-turbodrive branch 3 times, most recently from 486ee94 to 501d8d5 Compare December 6, 2024 12:58
@ulferts ulferts force-pushed the code-maintenance/59779-enable-morphing-for-turbodrive branch from 5ab5627 to 4e1e337 Compare December 10, 2024 21:15
const element = event.target as HTMLElement;

// In case the element is an OpenProject custom dom element, morphing is prevented.
if (element.tagName.startsWith('OPCE-')) {
Copy link
Contributor

@dombesz dombesz Dec 18, 2024

Choose a reason for hiding this comment

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

According to this #17223 (comment) , it would be advisable to use toUpperCase for comparing the tagname.

Suggested change
if (element.tagName.startsWith('OPCE-')) {
if (element.tagName.toUpperCase().startsWith('OPCE-')) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants