Can I move the build poll button so it is first


can we rearrange all those options like if I wish to keep the Build Poll as the first option?

1 Like

This can not be reordered at the moment, it would require some big changes to our current API, or possibly if we used flex here longer term people could just reorder with CSS.

cc @awesomerobot / @joffreyjaffeux

As it stands there is no ordering and core stuff is always first.

https://github.com/discourse/discourse/blob/38a30a6e961dc28d473709d47c5a357eab64998d/app/assets/javascripts/discourse/app/controllers/composer.js#L291-L295

4 Likes

I think you can with some simple css in your theme:

.toolbar-popup-menu-options .select-kit-collection {
  display: flex;
  flex-direction: column;

  .select-kit-row[data-value="showPollBuilder"] {
    order: -1;
  }
}

EDIT: I made a component using this, enabled on meta. Only issue is that select-kit will highlight what it thinks is the first row on first expand, this could probably be fixed with css too, but way more work.

9 Likes