Storage UI: Delete Partition (in proposal; trash-can icon)#1915
Storage UI: Delete Partition (in proposal; trash-can icon)#1915mvidner merged 11 commits intostorage-config-uifrom
Conversation
that is, without asking for confirmation or checking if it is mandatory. split out PartitionMenuItem, because eslint said: 607:40 error React Hook "usePartition" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function react-hooks/rules-of-hooks
apparently a copy-paste bug in the prototype BTW shouldn't we use _(translations) more?
bfc96fb to
f2f32f3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
BTW I noticed that the ci-web.yml job does have a |
I think so. In fact, I asked for it back in September 12th at internal #team-yast Slack channel 😉 (see https://suse.slack.com/archives/C06JYR4ARRC/p1726172205760599) |
71cbcc7 to
9c94e8b
Compare
|
@mvidner I have updated the code and the test. Find some random comments below. About your doubts written as comments in the test, you were right. There are a lot of missing pieces in the interface concerning a11y. That’s somewhat intentional for the first round of this new proposal. It’s not the ideal way to work, since a11y should be another success criterion for a good MVP, but… Fortunately, RTL helps a lot in spotting an interface with markup issues due to its user interaction-based testing approach. Please, have a look at the changes I made and let’s discuss them in a meeting if needed. I’ve only done a few basic things to ensure we can at least test it easily, but there’s more work ahead (as follow-up tasks, I mean). As an aside note, think of these Another thing, not related to your PR, is the number of components inside the Finally, it would be great if you could rebase the |
9c94e8b to
5f012bb
Compare
and use `deletePartition` as variable name not to collide with the `delete` operator
Markup for adding roles and labels to make the interface a bit more accessible and easing unit testing with React Testing Library. Still needing love, thougth. But this is a kind of starting point / guidance commit.
5f012bb to
f292d2c
Compare
Pull Request Test Coverage Report for Build 12929888022Details
💛 - Coveralls |
| }; | ||
|
|
||
| // driveName, like "/dev/sda" | ||
| // mountPath, like "/" or "swap" |
There was a problem hiding this comment.
It makes sense to follow here the same syntax (jsdoc?) we are using all along the rest of the code.
There was a problem hiding this comment.
So this could be the first properly documented function in this file.
| mountPath: "swap", | ||
| size: { | ||
| min: 2_000_000_000, | ||
| default: false, // WTF does default mean?? |
There was a problem hiding this comment.
If the size was omitted and, as a result, that min of 2_000_000_000 was calculated by Agama itself, then "default" is true.
On the other hand, if that value of 2_000_000_000 was provided by the user, "default" is false.
ancorgs
left a comment
There was a problem hiding this comment.
Generally looks good. I added a comment about documentation and a clarification about a question raised in a comment.
Other than that, I only miss the changelog entry.
even better it belongs to storage.model.schema.json
| mountPath: "swap", | ||
| size: { | ||
| min: 2_000_000_000, | ||
| default: false, // false: user provided, true: calculated |
There was a problem hiding this comment.
@ancorgs thanks for the explanation...
now I know that the comment should actually go to storage.model.schema.json, but I haven't found a Makefile-like declaration to update the generated config-model.ts so I am postponing this yak shave
…his device) (#1934) ## Problem https://trello.com/c/JQ3blpRm  ## Solution The implementation was easier because the UI model already had a `removeDrive` method... but testing was fun again, because imitating the tests that worked for deleting a partition was not enough this time 😅 ## Testing - Added a new unit test - Tested manually ## Screenshots In action (used [Peek](https://github.com/phw/peek) for recording, thanks Ancor for the tip) 1. Try to delete `nvme01` but not possible because it contains `/` 2. Delete `/` from it (#1915)... (and we have an issue box, that's new but not from me 😄 ) 3. Now can delete `nvme01` 
Prepare for releasing Agama 12: * #1858 * #1887 * #1890 * #1892 * #1893 * #1894 * #1896 * #1898 * #1899 * #1900 * #1901 * #1906 * #1908 * #1909 * #1910 * #1911 * #1912 * #1914 * #1915 * #1917 * #1919 * #1920 * #1921 * #1922 * #1923 * #1924 * #1926 * #1927 * #1928 * #1929 * #1930 * #1931 * #1932 * #1933 * #1934 * #1935 * #1936 * #1937 * #1938 * #1939 * #1942 * #1943 * #1945 * #1948 * #1949 * #1952 * #1953 * #1954 * #1955 * #1957 * #1958 * #1959 * #1961 * #1963 * #1964 * #1967 * #1969 * #1970 * #1971 * #1972 * #1973 * #1974 * #1975 * #1976 * #1977 * #1979 * #1980 * #1981 * #1982 * #1984 * #1986 * #1987 * #1988 * #1990 * #1991 * #1992 * #1993 * #1995 * #1996 * #1997 * #1999 * #2000 * #2001 * #2002 * #2003 * #2004 * #2005 * #2006 * #2007 * #2008 * #2009 * #2010 * #2011 * #2012 * #2013 * #2014 * #2015 * #2016 * #2017 * #2019 * #2021 * #2022 * #2025 * #2027 * #2029 * #2030 * #2031 * #2033 * #2034 * #2035 * #2036 * #2037 * #2038 * #2039 * #2040 * #2045 * #2046 * #2050 * #2053 * #2054 * #2055 * #2056 * #2058 * #2060 * #2061 * #2062 * #2063 * #2064 * #2066 * #2067 * #2068 * #2069 * #2070 * #2071 * #2072 * #2073 * #2075 * #2076 * #2080 * #2082 * #2083
Problem
Making the trash-can icon work
Solution
ask for confirmationcheck that the partition is not mandatory... these two are postponed to a followup PBITesting
Screenshots
No. The deleted partition is not visible 🤣 and a video would be overkill.