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

IBX-6077: Fixed saving custom classes and attributes on tables in OE #107

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

vidarl
Copy link
Contributor

@vidarl vidarl commented Jul 16, 2023

Question Answer
JIRA issue IBX-6077
Bug/Improvement yes
New feature no
Target version 4.5
BC breaks no
Tests pass yes
Doc needed no

The editor used in 4.x saves tables inside a <figure> element. The editor would then save class and data-ezattribute on the <figure> element, instead of in the <table>.
We did apparently not fix our converters accordingly for 4.x.

I have solved it by making a new XSLT template copies the class and data-ezattribute attributes from ancestor element if that is a <figure> element.

I have not done anything with docbook->xhtml5.edit transformation. It seems like editor is backward compatible and also deals fine with having missing <figure> element and the attributes stored on <table> element as before.
But maybe we should inject a <figure> element when sending doc back to editor? Would that be considered a BC maybe ?

I think this is a better alternative than solving it in a PHP converter as done in #106

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@vidarl
Copy link
Contributor Author

vidarl commented Jul 16, 2023

@ibexa/php-dev @dew326 : Please review

@dew326 dew326 requested a review from alongosz July 17, 2023 05:57
@sonarcloud
Copy link

sonarcloud bot commented Jul 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vidarl vidarl requested a review from a team July 19, 2023 11:01
@alongosz alongosz changed the title IBX-6077: Custom classes and attributes on table in ReichText Online Editor are not saved IBX-6077: Allowed saving custom classes and attributes on tables in OE Jul 20, 2023
@alongosz alongosz added Feature New feature request Bug Something isn't working and removed Feature New feature request labels Jul 20, 2023
@alongosz alongosz changed the title IBX-6077: Allowed saving custom classes and attributes on tables in OE IBX-6077: Fixed saving custom classes and attributes on tables in OE Jul 20, 2023
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

+1 for the current state from my side.

Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

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

QA approved on IbexaDXP commerce 4.5

@alongosz alongosz merged commit 4c738dd into 4.5 Jul 28, 2023
24 checks passed
@alongosz alongosz deleted the ibx-6077_xslt branch July 28, 2023 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants