-
Notifications
You must be signed in to change notification settings - Fork 29
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
chore: 🤖 remove ember radio btn, update it with hds #2556
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -67,39 +72,55 @@ module('Acceptance | auth-methods | oidc', function (hooks) { | |||
|
|||
test('can view oidc state', async function (assert) { | |||
await visit(urls.authMethod); | |||
await click('.rose-layout-page-actions .rose-dropdown-trigger'); | |||
await click(CHANGE_STATE_SELECTOR); |
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.
note: I didn't use our new pattern commonSelectors since we have a separate ticket for that
{{on 'click' (fn @removeAsPrimary @model)}} | ||
/> | ||
<dd.Interactive {{on 'click' (fn @removeAsPrimary @model)}}> | ||
{{t 'resources.auth-method.actions.remove-as-primary'}} |
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.
this is the new expected format by HDS, instead of text attr, we need to yield it, I updated these as I was making changes in the same page. We have a separate ticket to update it in other places
f000b82
to
9a0df4a
Compare
</Rose::Form> | ||
<Hds::Form::Radio::Group | ||
@name='edition' | ||
class='theme-selector' |
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.
Non-blocking: I see theme-selector
class is being used for the theme and edition. Could we rename it to something more generic?
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.
updated!
01182af
to
d140d1f
Compare
} | ||
|
||
.dropdown-radio-btn { | ||
min-width: 20rem; |
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.
What is the reason to give a min width? Do we need this dropdown to have a min width by design? or its just to keep same as before?
</Rose::Form> | ||
</dropdown.section> | ||
</Rose::Dropdown> | ||
<Hds::Dropdown class='change-state' data-test-change-state as |dd|> |
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.
the <dd.Title @text={{t 'actions.change-state'}} />
seems to be missing
<dd.Radio | ||
checked={{eq @model.state state}} | ||
@value={{state}} | ||
{{on 'click' (fn @changeState @model state)}} |
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 think for this radio component we should use {{on 'change'}}
instead because a request is made when the user clicks a radio field that is already selected. However, if we use change
a new request is not made when a user clicks a already selected field.
@@ -77,32 +78,6 @@ export default class ApplicationRoute extends Route { | |||
} | |||
} | |||
|
|||
/** |
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.
great catch in removing this action!! 🙌
@@ -16,6 +31,13 @@ export default class ApplicationController extends Controller { | |||
@service featureEdition; | |||
@service flashMessages; | |||
|
|||
/** | |||
* Returns available themes |
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.
* Returns available themes | |
* Returns available themes | |
* @type {array} |
small suggestion
Description
https://hashicorp.atlassian.net/browse/ICU-15714
This PR removes ember-radio-btn package and updates it with HDS radio buttons
Screenshots (if appropriate)
How to Test
1. OIDC changes
2. Theme selection
3. Edition selection
Checklist
[ ] I have added JSON response output for API changes[ ] I have added steps to reproduce and test for bug fixes in the description