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

Fix/aut 3923/textreader image figure support #172

Merged
merged 7 commits into from
Nov 14, 2024

Conversation

olga-kulish
Copy link
Contributor

@olga-kulish olga-kulish commented Nov 8, 2024

Related to https://oat-sa.atlassian.net/browse/AUT-3923

Changes

  1. textReaderInteraction.scss
    Position "remove" icon for Figure. Same style is used in taoQtiItem-->item-creator.css for inline widgets.

  2. Question.js
    Set data-element-support-figure - this is needed for Fix/aut 3923/textreader image figure support extension-tao-itemqti#2613 where we check if <figure> is supported (if it's not supported, wrap-left/wrap-right will be applied directly to <img>).
    In pratice the difference is whether figcaption is available or not. So we could remove this data attribute for simplicity, and just disable <figure> for all PCIs.

  3. renderer.js
    Since usual renderers of QTI elements don't run in PCI, we need to copy this functionality inside PCI. Maybe this should be moved to portableLib. Need to remove qh5: namespace too.

Notes

When I click on Figure in CkEditor, there's an error:

Uncaught TypeError: Cannot read properties of undefined (reading 'p')
    at CKEDITOR.dom.elementPath.isContextFor (ckeditor.js?buster=67281c6ecaeb3:509:149)
    at CKEDITOR.command.refresh (ckeditor.js?buster=67281c6ecaeb3:209:273)
    at m (ckeditor.js?buster=67281c6ecaeb3:265:233) ...

I have no idea how to fix it yet. Looks harmless, so let's ignore it?
To get rid of it, we can sacrifice figcaption and disable <figure> support (and apply wrap class directly on <img>).

To test

On unit05. Related PRs:

@olga-kulish olga-kulish changed the base branch from master to develop November 8, 2024 06:43
@olga-kulish olga-kulish changed the base branch from develop to fix/AUT-3876/editor-passage-remove November 8, 2024 06:44
Copy link
Contributor

@oatymart oatymart left a comment

Choose a reason for hiding this comment

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

Looks to work well. 1 minor comment to review.

@olga-kulish olga-kulish requested a review from oatymart November 11, 2024 15:14
@olga-kulish olga-kulish self-assigned this Nov 13, 2024
Base automatically changed from fix/AUT-3876/editor-passage-remove to develop November 13, 2024 10:00
Copy link
Member

@wazelin wazelin left a comment

Choose a reason for hiding this comment

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

  • New code is covered by tests (if applicable)
  • Tests are running successfully (old and new ones) on my local machine (if applicable)
  • New code is respecting code style rules
  • New code is respecting best practices
  • New code is not subject to concurrency issues (if applicable)
  • Feature is working correctly on my local machine (if applicable)
  • Acceptance criteria are respected
  • Pull request title and description are meaningful
  • Pull request's target is not master

@olga-kulish olga-kulish merged commit 9871176 into develop Nov 14, 2024
@olga-kulish olga-kulish deleted the fix/AUT-3923/textreader-image-figure-support branch November 14, 2024 09:09
wazelin added a commit to oat-sa/tao-community that referenced this pull request Nov 21, 2024
…eases/tag/v54.20.1.1)**

- _Fix_ [AUT-3923](https://oat-sa.atlassian.net/browse/AUT-3923) : textreader image figure support [#4125](oat-sa/tao-core#4125) ( by [olga-kulish](https://github.com/olga-kulish) - validated by [olga-kulish](https://github.com/olga-kulish)
**[oat-sa/extension-tao-itemqti v30.20.0.2](https://github.com/oat-sa/extension-tao-itemqti/releases/tag/v30.20.0.2)**
 - _Fix_ [AUT-3923](https://oat-sa.atlassian.net/browse/AUT-3923) : textreader image figure support [#2613](oat-sa/extension-tao-itemqti#2613) ( by [olga-kulish](https://github.com/olga-kulish) - validated by [olga-kulish](https://github.com/olga-kulish) )
 - _Fix_ [AUT-3876](https://oat-sa.atlassian.net/browse/AUT-3876) : editor passage remove [#2605](oat-sa/extension-tao-itemqti#2605) ( by [olga-kulish](https://github.com/olga-kulish) - validated by [olga-kulish](https://github.com/olga-kulish) )
**[oat-sa/extension-pcisample v3.9.2](https://github.com/oat-sa/extension-pcisample/releases/tag/v3.9.2)**
 - _Fix_ [AUT-3923](https://oat-sa.atlassian.net/browse/AUT-3923) : textreader image figure support [#172](oat-sa/extension-pcisample#172) ( by [olga-kulish](https://github.com/olga-kulish) - validated by [olga-kulish](https://github.com/olga-kulish) )
**[oat-sa/extension-pcisample v3.9.1](https://github.com/oat-sa/extension-pcisample/releases/tag/v3.9.1)**
 - _Fix_ [AUT-3876](https://oat-sa.atlassian.net/browse/AUT-3876) : editor passage remove [#171](oat-sa/extension-pcisample#171) ( by [olga-kulish](https://github.com/olga-kulish) - validated by [olga-kulish](https://github.com/olga-kulish) )
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