Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative to another PR #1115

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Mar 25, 2024

Just to make sure

@ancorgs
Copy link
Contributor Author

ancorgs commented Mar 25, 2024

This was useful to check #1106 has been correctly repaired. Now it can rest.

@ancorgs ancorgs closed this Mar 25, 2024
dgdavid and others added 16 commits March 25, 2024 15:59
It allows providing a collection of paths to look for in the given
object, returning the first content found.

Although it could have a better name and/or signature (initially
`findContent({ in, at })`), the motivation for adding it arose in the
context of creating an expandable selector for the storage proposal.

Such a selector will receive a collection of device objects to be
represented in an expandable table. These elements might have children,
which will be hidden when their parent is collapsed. But not all kinds
of devices will have these children at the same key/level/path. At the
time of writing, we know that partitions of a disk can be found at
`partitionsTable.partitions` location. But that might not be the case
for LVM VGs, which most probably will be at `vgs` or `volumes` path.

Thus, relying on the method added in this commit, the selector will be
ready to accept a path or paths to search for children. In addition to
making it more versatile, it eliminates the need to create separate
collections for reallocating children of each kind of item.
On the basis of a PF/Table, it enables the creation of one-level nested
selectors.

In spite of being designed to select storage devices, it is intended to
be agnostic enough to be reused wherever necessary. However, unit tests
added for this first commit uncovered a few improvements that are needed
before releasing.
By passing a function via prop similarly to it was done for retrieving
the content of each column.

It is more clear and makes code introduced at 68dc256 no longer
needed.
By adding few CSS rules to the [data-type="agama/expandable-selector"]
selector.
It's not needed in the current Agama forms workflow, in which the form
always hold the state.

This is something that maybe can be changed in the future to avoid
having widgets that are re-rendered all the time without no other reason
than the "requirement" of lifting their state. Would be more
"reasonable" having forms able able to ask about the data before sending
it.
It uses also better wording for its props and add missing test.

Drop leftover in core/utils.js too.
Initially based on props only, but most probably it will evolve to
provide subcomponents to make possible to build more detailed options by
just writing JSX.

It has been added to be used in the new device selection dialog that
will land in the Storage page and after discarding plain HTML input
radios and tabs components. The radios were discarded because target
actions are not actually form options but rather "form/mode pickers"
which have an immediate effect on the user interface after selecting
one. The tabs for avoiding mislead the user that they are navigating
between these options. In other words, to ensure users are aware of the
mutually exclusive settings they are in front of.

It is inspired by the segmented control pattern. To read more have a
look to below links

* https://primer.style/components/segmented-control
* https://medium.com/tap-to-dismiss/a-better-segmented-control-9e662de2ef57
It will be replaced by a new and hopefully simpler selector
Which will replace both, device and LVM selectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants