-
Notifications
You must be signed in to change notification settings - Fork 44
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
Closed
ancorgs
wants to merge
16
commits into
agama-project:storage-next-device-selection
from
ancorgs:storage-next-device2
Closed
Alternative to another PR #1115
ancorgs
wants to merge
16
commits into
agama-project:storage-next-device-selection
from
ancorgs:storage-next-device2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was useful to check #1106 has been correctly repaired. Now it can rest. |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Just to make sure