tabWidget: should option `ordered` be used for two (seemingly) different things?
@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
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.