SolidOS / SolidOS/solid-ui

tabWidget: should option `ordered` be used for two (seemingly) different things?

Offen
#234 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@timbl arbeitet bereits daran.

Seit 03.3.2020.

Vorherrschende Sprache
TypeScript
Sterne
153
Forks
46
Ø Merge
1 T. 8 Std.
Gemergte PRs (30 T.)
7

Beschreibung

I'm writing tests for the tabWidget, and came upon a couple of strange behaviors. First of all, whether or not options.ordered is true or false:

  function sync () {
    if (options.ordered) {
      orderedSync()
    } else {
      // @@ SORT THE values
      orderedSync()
    }
  }

Second, it's used to decide whether items should be objects from a list of triples, or if they should be in a collection:

    if (options.ordered !== false) {
      // default to true
      return store.the(subject, options.predicate).elements
    } else {
      return store.each(subject, options.predicate)
    }

I think it's fine to use an option for this, but is ordered the best name for it? Maybe collection would be better? (And the to remove the if-branches for function sync, or have option ordered actually do something different there.)

For now, I'll wait with writing tests for option until I understand this better.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.