NotePlan / NotePlan/plugins

Create sorting API and use it for plugin list (and beyond)

Aperta
#268 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@EduardMe ci sta già lavorando.

Dal 5/7/2023.

API
Lingua principale
JavaScript
Stelle
204
Fork
82
Merge medio
22h 27m
PR unite (30g)
3

Descrizione

Plugin list is sorted by name but emojis throw it off.

Maybe you can use something like this in the sort algorithm:
let result = string.replacingOccurrences( of:"[^A-Za-z0-9]", with: "", options: .regularExpression)
Feels like we encounter this in the sidebar and lots of other places also. I know @codedungeon has run into this. Might be good for you to expose an API that sorts a list of object by a certain key. So you and all the plugins can be 100% consistent.
e.g.
sortObjectListByAlpha(objectList, keyToSortBy)

@EduardMe said:
"Ok, I tried to remove the emojis, but it doesn't work consistently. Still issues are getting in
That's much more work than I thought. Here the next feedback will be: "Why is '!' not sorting the plugin up?"

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.