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

[List start/reversed] Editing part #10673

Closed
Reinmar opened this issue Oct 11, 2021 · 1 comment · Fixed by #10973
Closed

[List start/reversed] Editing part #10673

Reinmar opened this issue Oct 11, 2021 · 1 comment · Fixed by #10973
Assignees
Labels
package:list squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).

Comments

@Reinmar
Copy link
Member

Reinmar commented Oct 11, 2021

📝 Provide a description of the new feature

Part of #1032.

Follows #10540.

We changed the idea a bit during the refinement and will go for:

Idea: Instead of having a separate plugin, extend ListStyle and make it configurable which styles should be enabled: style, start, reversed


If you'd like to see this feature implemented, add a 👍 reaction to this post.

@Reinmar Reinmar added type:feature This issue reports a feature request (an idea for a new functionality or a missing option). squad:core Issue to be handled by the Core team. package:list labels Oct 11, 2021
@oleq
Copy link
Member

oleq commented Oct 26, 2021

Scope

  • Note: The functionality of listReversed and listStart is very similar, we should optimize the code/helpers/logic to re-use things when possible.

listReversed attribute

  • For the record: this attribute only concerns numbered lists.
  • Modify ListStyleEditing
    • Extend the schema.
    • Upcast converter for the listReversed attribute.
    • Downcast converter for the listReversed attribute.
    • Add/extend the fixListStyleAttributeOnListItemElements() post-fixer for the listReversed attribute to make sure all list items have it.
    • Add/extend the _mergeListStyleAttributeWhileMergingLists() functionality to synchronize the listReversed attribute between merged lists.
    • Add/extend the removeListStyleAttributeFromTodoList post-fixer so the listReversed attribute does not leak to TODO lists.
    • Integration with indent/outdent: when indenting/outdenting the listReversed attribute should be cleaned/inherited from the parent list.
    • Restoring (clean-up) of the listReversed attribute when the type of the list changes.

listStart attribute

  • For the record: this attribute only concerns numbered lists.
  • Modify ListStyleEditing
    • Extend the schema.
    • Upcast converter for the listStart attribute.
    • Downcast converter for the listStart attribute.
    • Add/extend the fixListStyleAttributeOnListItemElements() post-fixer for the listStart attribute to make sure all list items have it.
    • Add/extend the _mergeListStyleAttributeWhileMergingLists() functionality to synchronize the listStart attribute between merged lists.
    • Add/extend the removeListStyleAttributeFromTodoList post-fixer so the listStart attribute does not leak to TODO lists.
    • Integration with indent/outdent: when indenting/outdenting the listStart attribute should be cleaned/inherited from the parent list.
    • Restoring (clean-up) of the listStart attribute when the type of the list changes.

Commands

  • Modify ListStyleCommand
    • Add an argument to the constructor to let it know which model attribute it should operate on.
      • constructor( editor, attributeName, defaultValue )
    • There will be 3 instances of the command: one for listStyle, one for listReversed, and one for listStart
    • Let's make sure commands for reversed and start are disabled when an unordered list is selected
      • The UI will listen to this state.
      • Two possible implementations to choose from:
        • more options to the constructor
        • class inheritance with custom _checkEnabled()

@martynawierzbicka martynawierzbicka added the support:2 An issue reported by a commercially licensed client. label Nov 4, 2021
@arkflpc arkflpc self-assigned this Nov 23, 2021
oleq added a commit that referenced this issue Dec 16, 2021
…-lists

Feature (list): Added support for reversed lists and list start index (`reversed` and `start` HTML attributes). Closes #10673.
@oleq oleq added this to the iteration 50 milestone Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list squad:core Issue to be handled by the Core team. support:2 An issue reported by a commercially licensed client. type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants