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

ui: KV Form and List Components #8307

Merged
merged 10 commits into from Jul 20, 2020
Merged

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Jul 14, 2020

In #8219 we made some additions to allow us to move away from mixin/inheritance based form and 'CRUD write actions'. We initially used these in our Intentions Forms and Lists that we use in various areas of the UI, at the same time we used KV to ensure that the components would be re-usable but didn't finish these up and PR them

This PR uses these same components for the KV section of the UI.

Additions:

  1. <ConsulKvForm />
  2. <ConsulKvList />
  3. <ConsulSessionForm />

The majority of the work involves making the new component and dropping the old partial into the body of a <DataForm /> component. As a result we were able to remove another 4 Controllers, 1 Route, 1 Mixin and 2 partials, plus their tests plus a bit more red change here and there.

Notes:

  1. <ConsulSessionForm /> is needed for being able to 'invalidate a session' from a key value which is just using the 'delete' action from its <DataForm /> (we can also use this now in our Node > Session Listing, for a future PR)
  2. We fixed up <ConfirmationDialog />, which is probably from the very start of the UI, to make it much more 'ember-y' - a small note here, these confirmations are due to be completely replaced at some point.
  3. We made an accompanying pageobject file for the <ConsulKvList /> component for testing and moved the delete acceptance testing our of the top-level looping delete feature file into its own delete feature file within the kv folder.
  4. Lastly I spotted a test file that didn't have the -test.js suffix, so it wasn't being run, this file was just a placeholder file anyway (the tests inside were skipped for the moment), so I just deleted this file while I was here.
  5. An advantage of this work that I keep forgetting to mention is that we are no longer overwriting Controller.setProperties in order to convert our data into changesets - this converting/wrapping is now done in the <DataForm /> instead of overwriting a common ember method.

@johncowen johncowen added theme/ui Anything related to the UI backport/1.8 labels Jul 14, 2020
@johncowen johncowen force-pushed the ui/chore/kv-form-list-components branch from e67ce97 to 65ff8ba Compare July 20, 2020 09:44
@johncowen johncowen marked this pull request as ready for review July 20, 2020 09:54
Copy link
Contributor

@kaxcode kaxcode left a comment

Choose a reason for hiding this comment

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

LGTM

@johncowen johncowen merged commit 5a5f87e into master Jul 20, 2020
@johncowen johncowen deleted the ui/chore/kv-form-list-components branch July 20, 2020 17:04
@hashicorp-ci
Copy link
Contributor

🍒✅ Cherry pick of commit 5a5f87e onto release/1.8.x succeeded!

hashicorp-ci pushed a commit that referenced this pull request Jul 20, 2020
* Add components for KV form, KV list and Session form

* Pass through a @Label attribute for a human label + don't require error

* Ignore transition aborted errors for if you are re-transitioning

* Make old confirmation dialog more ember-like and tagless

* Make sure data-source and data-sink supports KV and sessions

* Use new components and delete all the things

* Fix up tests

* Make list component tagless

* Add component pageobject and fixup tests from that

* Add eslint warning back in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants