esl icon indicating copy to clipboard operation
esl copied to clipboard

[🚀esl-panel-group]: add ability to specify the strategy of closing panels in case the `max-open-items` limit is reached

Open ala-n opened this issue 2 years ago • 0 comments

As an ESL consumer, I want to have a predictable and full strategy for esl-panel-group in case it handles max-open-items (more than 1 panel).

Test case:

  • Configure 4 esl-panels inside of esl-panel-group
  • Set esl-panel-group limit max-open-items = "3"
  • Make open 2-d, 3-rd and 4-th panel
  • Try to open 1-panel, repeat reopening of invective panel

Current behavior: Only 1-st and 2-nd panels can be closed.

Expected behavior: Strategy to close active panels according to some order, ideally predictable.

Considered solutions:

  1. Implement a round counter to choose an active panel to close
    • needs to be implemented in POC, not sure it doable with one simple counter
  2. Math random
  • the easiest way, 100% doable, but unpredictable
  1. Some other suggestions....

Priority (Minor, Post 4.0.0)

ala-n avatar Aug 30 '22 13:08 ala-n