SolidOS / SolidOS/solid-ui

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

Open
#234 2 comments 0 reactions 1 assignee View on GitHub

@timbl is already working on this.

Since Mar 3, 2020.

Dominant language
TypeScript
Stars
153
Forks
46
Avg merge
1d 8h
Merged PRs (30d)
7

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.