nested-list icon indicating copy to clipboard operation
nested-list copied to clipboard

feat: List 2.0

Open e11sy opened this issue 6 months ago • 0 comments

This PR is related to the #75 issue This PR is a part of global work on List 2.0

Problems

  • Can not convert from list to check list
  • Data model has no place for meta (e.g. checked field for checklist)
  • Nesting is not customizable
  • Can not increase nesting more than 1 time
1
    1.1.1

is currently unavailable

  • Can't customize ordered list (custom numeration or starting with custom number)

Solutions

  • Separated rendering and tabulation for greater compliance with the SPR model
  • Now ones list style would be changed, list would be rerendered
  • Now data model will contain meta field
data : {
  items : [
    {
      "content": "Canon",
      "meta" : {
        checked: false
       },
      "items": [
        {
          "content": "Fisheye",
          "meta" : {
            checked: true
          },
          "items": [
            {
              "content": "Canon 15mm f/2.8",
              "meta" : {
                checked: true
              },
              "items": []
            },
          ]
        }
      ]
    } 
  ]
}   
  • Nesting customization by maxLevel config option
  • Add support for <ol> attributes in config (such as type, start, reversed)

Status

  • [x] Separate rendering and tabulation
  • [x] Support checklist
  • [x] List rerendering on style change
  • [x] Support new data model
  • [ ] Fix list bullets alignment
  • [ ] Add nesting customization
  • [ ] Add ordered list customization
  • [ ] Refactor paste config and nesting behaviour
  • [ ] Export all available lists into toolbox for #70

Additional

  • Added index.html file and updated vite.config.js, so now dev mode is available
  • Updated @codexteam/icons package to latest for checklist icon

I will make ordered list and nesting customizations, refactoring of the paste config and nesting behaviour in the following pr

e11sy avatar Aug 02 '24 19:08 e11sy