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: Add Typescript for PKI engine #17927

Merged
merged 14 commits into from
Nov 15, 2022
Merged

UI: Add Typescript for PKI engine #17927

merged 14 commits into from
Nov 15, 2022

Conversation

hashishaw
Copy link
Contributor

Add Typescript as a dependency, so we can use it in forthcoming work 🎉
To start, I created a new TS/Glimmer component in the core shared lib, and also typed an existing PKI component

@hashishaw hashishaw added the ui label Nov 14, 2022
@hashishaw hashishaw added this to the 1.13.0-rc1 milestone Nov 14, 2022
@hashishaw hashishaw force-pushed the ui/VAULT-9879/ts-engine branch from f9f43bf to 3644b01 Compare November 14, 2022 20:55
Copy link
Contributor

@hellobontempo hellobontempo left a comment

Choose a reason for hiding this comment

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

Really nice job!

@onChange={{this.checkboxChange}}
data-test-key-usage-key-usage-checkboxes
/>
<CheckboxGrid
Copy link
Contributor

Choose a reason for hiding this comment

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

😍 so clean! 👏

label: string;
}

const KEY_USAGE_FIELDS: Field[] = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for now, but just as a spitballing note - wondering if these could live in a pki helper if we have any other fields that could/will be stored as consts. Otherwise - do we need to define these here? Or can we directly set these values on keyUsageFields and extKeyUsageFields below?

import { hbs } from 'ember-cli-htmlbars';
import Sinon from 'sinon';

module('Integration | Component | checkbox-grid', function (hooks) {
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 👏 👏

return [];
},
})
extKeyUsage;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! Did you add this in case this attr isn't a consistent type as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I needed to define this attribute as an array because without it, trying to set the value to an array was falling back to just the string. Probably some updates we can make in openApiToAttrs to address this but figured that was out of scope for this

@hashishaw hashishaw merged commit 9ff454d into main Nov 15, 2022
@hashishaw hashishaw deleted the ui/VAULT-9879/ts-engine branch November 15, 2022 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants