Bug ? Select isMulti - Labels are not sorted by selection order

Hello,

I use the Select UI kit 2 component in a Confluence macro with the parameter “isMulti”.
Sometimes when I select an option it doesn’t go to the last position in the Select field. This behavior is not intuitive for the user. Is it normal or is it a bug ?

When I get options selected in config object (context.extension.config) I have the correct selection order. So there is a difference between the order displayed and config order.

Examples :
I select in this order :

  1. Revision
  2. Description
  3. Epic Name
  4. Résumé
  5. Issue Color → Bug ? Issue Color go to position 2

Recording 2024-12-01 at 00.53.54

Other example :
I select in this order :

  1. Environnement
  2. Résumé → Bug ? Issue Color go to position 1

Recording 2024-12-01 at 00.59.02

Hello @ThibautFAURE

From what I can observe from the first video you supplied, the final set of options the user has selected is being auto-arranged into the same sort order as they are stored in the multi-selection field, which supersedes the order in which they have been selected by the user.

You just happened to select 4 options in their correct order first, then selected 1 option, Issue Color, that was earlier in the order, which was then auto-arranged into the correct place. The same happened when you selected Environment before Resume, which the multi-select field auto-arranged into the correct order.

I don’t think this is a ‘bug’, as the multi-select field does this auto-arranging of the options a user selects by default and I don’t know of a way to disable it.

Thank you @sunnyape for your explanation I understand the display logic now. But this logic is different from the Select component in other Atlassian products. For example on the Atlassian Design website the order of display of the options is that selected by the user, there is not auto-arranged : https://atlassian.design/components/select/examples#multi-select

It would be great if the behavior of the Select component in UI kit 2 was the same as in other Atlassian products so that the user had a unified experience. Do you think that an evolution of the Select component of UI kit 2 could be planned?

Atlassian standard behavior :
Recording 2024-12-01 at 11.23.07

Forge macro Confluence :
Recording 2024-12-01 at 11.26.50

In the ‘standard behaviour’ example where the user selects Brisbane, then Adelaide and the two options stay in their selected order, what happens when the user closes the page, then comes back? Are those options still in the selected order?

The auto-arranging doesn’t always happen ‘live’ on the visible page:

As to why the UI Kit version of that field type updates dynamically on the page instead of offline… I don’t know. Someone else will have to advise on that.

Hi @ThibautFAURE,

I’ve had a quick look over at the Forge Project on our Atlassian Ecosystem Jira and it doesn’t look like there’s a ticket there for this functionality change - so I would say that it’s not currently planned. If it’s something you feel strongly should be implemented, you are welcome to raise a suggestion there.

When raising a suggestion, it’s a good idea to include how this is impacting your app / customers.

I hope this explains!
Mel

Thank you @mpaisley , I created this suggestion https://ecosystem.atlassian.net/browse/FRGE-1604
I have detailed as much as possible and I hope that my ticket is easily understandable.

You can vote for my suggestion :slight_smile:

1 Like