-
Notifications
You must be signed in to change notification settings - Fork 69
Reorganize and redefine some storage menus #2241
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
Conversation
3f6f101 to
cf62f73
Compare
- The menu sets the aria-current property to the expanded item. - Useful for unit tests to detect whether a submenu is expanded. - Note that #toBeVisible cannot be used because Jsdom does not report correct styles, see jsdom/jsdom#2986.
- Avoid repeating the size of the drive name.
b6d93cc to
0e06ef9
Compare
|
The part about avoiding the hardcoded "20" for the truncates is just partially done. At the time of writing this comment there are another 4 occurrences that were overlooked (at several components like I will try to commit an alternative solution. |
Done. |
Basically by removing the gray background originally used to distinguish them from standard toggles. This background is no longer necessary for indicating interactivity, and removing it results in a cleaner, more consistent interface.
And use it for adding the agm-inline-menu-toggle CSS class when needed.
Since toggle are using now the default caret.
dgdavid
left a comment
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.
Left just a couple of minor notes, but overall it looks really good.
Thanks for handling the creation of the MenuButton core component. It looks solid and should help a lot with centralizing the code for building PatternFly menus more easily.
| } from "@patternfly/react-core"; | ||
| import { _ } from "~/i18n"; | ||
|
|
||
| /** PF complains with ids generated by useId because they contain colons. Such ids cannot be used |
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.
Worth to mention that useId() is actually generating an identifier that is a valid HTML id attribute but not a valid CSS identifier. Unfortunately, PatternFly component is querying the node by using the querySelector JavaScript method without escaping the id (by using CSS.escape() for example).
That's why just using the identifier returned by useId is crashing with
Uncaught SyntaxError: Failed to execute 'querySelector' on 'Element': '#:r20:' is not a valid selector. at MenuBase.handleDrilldownTransition (Menu.js:34:1)
|
|
||
| interface MenuButtonItemProps extends Omit<MenuItemProps, "direction" | "drilldownMenu"> { | ||
| items?: React.ReactNode[]; | ||
| upProps?: { label?: string }; |
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.
In the future, I'd allow more MenuItem props for being able to influence such an item easily.
Co-authored-by: David Díaz <[email protected]>
4c3ee3e to
6ba69cd
Compare
Prepare to release Agama 14: * #1994 * #2041 * #2103 * #2178 * #2189 * #2200 * #2205 * #2209 * #2212 * #2213 * #2214 * #2215 * #2216 * #2217 * #2219 * #2220 * #2224 * #2225 * #2226 * #2227 * #2228 * #2230 * #2231 * #2232 * #2233 * #2235 * #2237 * #2239 * #2241 * #2242 * #2244 * #2245 * #2246 * #2247 * #2248 * #2249 * #2250 * #2251 * #2252 * #2253 * #2254 * #2255 * #2256 * #2257 * #2259 * #2260 * #2262 * #2265 * #2266 * #2268 * #2269 * #2271 * #2272 * #2273 * #2275 * #2276 * #2278 * #2281
https://build.opensuse.org/request/show/1272125 by user IGonzalezSosa + anag_factory - Version 14 - Process the product changed event so the UI can better react on registering the product shortly after that (gh#agama-project/agama#2274) - Rework the network page to (gh#agama-project/agama#2247): - Fix several problems with Wi-Fi networks handling. - Improve error reporting when the connection failed. - Use a regular form to connect, instead of the old "drawer" component. - Drop the "disconnect" and "forget" actions by now. - Reduce the amount of requests to the backend. - Shorten storage device names. - Move LVM logical volumes to partitions, if possible. - Add MenuButton component (gh#agama-project/agama#2241). - Improve the interface to display and edit the iSCSI initiator (bsc#1239046, bsc#1231385, gh#agama-project/agama#2269). - Fix flickering i
Problem
We recently added support for LVM to the storage section of the web interface. But we lacked time to polish some details like:
Additionally, the current interface is problematic when the name of a disk is too long (eg. multipath devices) or when there are too many disks to choose from.
Solution
This reorganizes the menus a bit to improve the overall situation, although it probably does not fully fix any of the problems in a definitive way.
DriveDeviceMenuand its options were reorganized:Implementation details
DriveDeviceMenuand the already existingConfigureDeviceMenucomponents are now based on newcore/MenuButtoncomponent. More menus could be adapted in the future.Pending
About device names
Most disks have a device name like
/dev/sdaor/dev/nvme0n1. But if multipath is activated with its default configuration, every disk will get a name that is based on a world-wide unique WWID. See some examples of disks and partition names taken from a real system in which multipath was activated: