-
Notifications
You must be signed in to change notification settings - Fork 43
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
Pattern selection #792
Pattern selection #792
Conversation
I think this is a movement in the good direction. Now it looks similar to the rest of pages. Personally, I would remove the first 4 lines, resulting something like: [ filter ] Graphical environments Dev tools What do you think? |
@lslezak: FYI: patterns have a (numeric IIRC) |
I wouldn't remove the total size of the software to install. That affects remaining disk space for working with the system as well as download times. As for the number of patterns to install, I don't know. It could be in one line to be a bit more concise:
Maybe the "Filter" heading could be a bit more subdued to avoid the impression that it's a category on the same level as the others; it's really just a tool to work on the others. Maybe a smaller font or a greyish text color would make that clearer (needs experimentation). |
Yes, I wanted to implement the same also here. Sorting the patterns inside a group is trivial, I have problems with sorting the groups themselves. In TW with Online repos I'm getting this order in YaST: While in Agama I'm getting:
It seems that libyui should sort the groups according to the first pattern in the group (the pattern with the lowest order value). But for some reason the result is slightly different than expected and actually the Agama result matches that expected behavior. In libyui for example the I think it should be placed between the @shundhammer any idea why the libyui sorting is like that? (Note: the |
The number of selected patterns is not that important, I'm fine with removing that. In the worst case you can still count them manually if you need that. But the installation size is important, it determines how much time the installation will take, how much data will be downloaded (if you have slow network or pay per megabyte) and the available free space after installation. You can see that number in the overview dialog after going back, but I think it is better to see immediately how your each change influence the installation size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, thanks a lot for taking care of this @lslezak!
I've done a review focusing mostly in the UI end result, omitting some parts I foresee will change in a near future like the styles for building the selector, the way we tell the user there is something auto-selected and few other minor things. As you told me, it's still not finished and, moreover, it's good enough for a first release that can be improved in next iterations.
Trying to keep it short, in no particular order
- I wouldn't use title for the utility section. It is an introductory area of the Software page in which we can put useful information and some utils, like the search/filter box.
- I'd avoid mixin the use of sections icons in a same Page. I.e., icons for all or for none. At least by now. See my comment in that regard.
- Do not use a header for the filter. Just a plain label or we can even try to release it only with the placeholder.
- Keep the Software overview section clickable always. The page should be aware if the client is busy and rendered itself in the loading mode. Users can land directly in
https://agama/#/software
. - Use the core/Section component as much as possible. Improve it if needed or create an issue if you believe these improvements do not necessary block this PR and are out of its scope.
I've deliberately skipped the logic part for building the whole page and making it work. No particular reason, I simply need more time for getting familiar with it and been able to come up with a good review/contribution. In any case, please add tests. They will help to prevent regression bugs and to have a big picture about pattern selection.
As commented, I think simply removing the header and using either, an HTML form label or only the text input placeholder, would be enough. Do not introduce more font sizes or color just for this. |
e8ff8e9
to
687b0b5
Compare
JFTR: It turned out that libyui-qt-pkg had done this wrong; it always picked the last pattern for the order of its parent category, not the first one as it should. The fix for that is on the way at libyui/libyui#107 (which also includes debugging aids such as making the order of each pattern and category visible in its own column when a environment variable is set). |
improved group sorting, use String for pattern order
fb5a04c
to
b0cb432
Compare
* @param {JSX.Element} children the wrapped content with the patterns belonging to this group | ||
* @returns {JSX.Element} | ||
*/ | ||
export default function PatternGroup({ name, children }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP: does it deserve its own component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally it was much more complex because it was a collapsible/expandable section. But I'd probably still keep it separate as it is a self contained logical part.
* @property {string} description long description of the pattern | ||
* @property {string} order display order (string!) | ||
* @property {string} icon icon name (not path or file name!) | ||
* @property {number|undefined} selected who selected the pattern, undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NP: I usually indicate optional property instead of undefined, e.g. @property {number} [selected] - who selected ...
. We should agree a common format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I copied that from other code so it seems some unification is needed...
Yes, I just reused the same icons from YaST for the first iteration, I didn't want to reinvent the wheel. Later we can change that with something better. |
Problem
Solution
Testing
TODO
Screenshots