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

Remove sulu-link tags completely if they are invalid #7104

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

mamazu
Copy link
Contributor

@mamazu mamazu commented Jun 25, 2023

Q A
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #6956
Related issues/PRs #6956
License MIT
Documentation PR sulu/sulu-docs#773

What's in this PR?

When specifying the 'remove-if-not-exist' property on a link to be true, then the entire tag (including it's contents will be removed)

Why?

To prevent links that are invalid and text that (when it's not a link) looks weird. Like if you have a link list and one of the links is broken, it would be better to remove the text as well.

Example Usage

<sulu-link href="123-123-123" title="Test-Title" provider="article" remove-if-not-exists="true">Test-Content</sulu-link>

To Do

  • Create a documentation PR
  • Add breaking changes to UPGRADE.md

mamazu added a commit to mamazu/sulu-docs that referenced this pull request Jun 25, 2023
mamazu added a commit to mamazu/sulu-docs that referenced this pull request Jun 25, 2023
@mamazu mamazu force-pushed the link-remove-if-non-existant branch from cb4c287 to 23798db Compare June 25, 2023 15:03
@alexander-schranz alexander-schranz changed the base branch from 2.5 to 2.6 June 26, 2023 07:22
@alexander-schranz alexander-schranz added the Feature New functionality not yet included in Sulu label Jun 26, 2023
@alexander-schranz
Copy link
Member

Looks good from my side. /cc @sulu/core-team do you agree with this new added feature and the name remove-if-not-exists?

@wachterjohannes
Copy link
Member

@mamazu @alexander-schranz this makes totally sense

@alexander-schranz alexander-schranz merged commit 246f63b into sulu:2.6 Jun 27, 2023
7 checks passed
@alexander-schranz
Copy link
Member

@mamazu Thank you!

@mamazu mamazu deleted the link-remove-if-non-existant branch October 17, 2023 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in Sulu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add possibility to remove a sulu-link if not exist
3 participants