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

Move storage pool creation form from side panel to dedicated page [WD-6352] #493

Merged
merged 3 commits into from
Oct 20, 2023

Conversation

lorumic
Copy link
Contributor

@lorumic lorumic commented Oct 13, 2023

Done

  • Moved storage pool creation form from side panel to dedicated page.

Fixes WD-6352

QA

  1. Run the LXD-UI:
    • On the demo server via the link posted by @webteam-app below. This is only available for PRs created by collaborators of the repo. Ask @lorumic or @edlerd for access.
    • With a local copy of this branch, run as described here.
  2. Perform the following QA steps:
    • Go to storage page
    • Click on the "Create storage pool" button
    • Check the new form in a dedicated page: it should look and behave as expected

@webteam-app
Copy link

Demo starting at https://lxd-ui-493.demos.haus

Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lorumic
Copy link
Contributor Author

lorumic commented Oct 18, 2023

@piperdeck Could you please do a design review when you have time? Thanks

Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The demo build fails:

#14 8.763 [vite]: Rollup failed to resolve import "pages/instances/forms/FormMenuItem" from "/srv/src/pages/storage/forms/StoragePoolFormMenu.tsx".
#14 8.763 This is most likely unintended because it can break your application at runtime.
#14 8.763 If you do want to externalize this module explicitly add it to
#14 8.763 `build.rollupOptions.external`
#14 8.770 error during build:
#14 8.770 Error: [vite]: Rollup failed to resolve import "pages/instances/forms/FormMenuItem" from "/srv/src/pages/storage/forms/StoragePoolFormMenu.tsx".
#14 8.770 This is most likely unintended because it can break your application at runtime.
#14 8.770 If you do want to externalize this module explicitly add it to
#14 8.770 `build.rollupOptions.external`
#14 8.770     at viteWarn (file:///srv/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:48216:27)
#14 8.770     at onwarn (/srv/node_modules/@vitejs/plugin-react/dist/index.cjs:255:9)
#14 8.770     at onRollupWarning (file:///srv/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:48245:9)
#14 8.770     at onwarn (file:///srv/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:47976:13)
#14 8.770     at file:///srv/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:24276:13
#14 8.770     at Object.logger [as onLog] (file:///srv/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:25950:9)
#14 8.770     at ModuleLoader.handleInvalidResolvedId (file:///srv/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:24862:26)
#14 8.770     at file:///srv/node_modules/vite/node_modules/rollup/dist/es/shared/node-entry.js:24822:26

I guess something went bad on the merge resolve?
Edit: The import needs to pick from components/forms.
Edit: Pushed a fix to your branch @lorumic

@lorumic
Copy link
Contributor Author

lorumic commented Oct 18, 2023

Demo is up and running with all the updates.

@piperdeck
Copy link

The only issue I can find is that the description field should be a textarea, rather than a single-line field

@lorumic
Copy link
Contributor Author

lorumic commented Oct 20, 2023

The only issue I can find is that the description field should be a textarea, rather than a single-line field

Good catch! I fixed that, and I also aligned all the description fields in other pages, which were still using the text input, to use textarea instead. Then I extracted the function to calculate the textarea's rows, so that it can be reused in the many places where it's needed, please have a look when you have time @edlerd

src/pages/storage/forms/StoragePoolFormMain.tsx Outdated Show resolved Hide resolved
src/util/formFields.tsx Show resolved Hide resolved
@lorumic lorumic requested a review from edlerd October 20, 2023 07:54
Copy link
Collaborator

@edlerd edlerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks :)

@edlerd edlerd merged commit 5ce6c5f into canonical:main Oct 20, 2023
5 checks passed
@lorumic lorumic deleted the storagepool-creation-form branch October 26, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants