-
Notifications
You must be signed in to change notification settings - Fork 454
feat: Add Serial number to Option in LookupField #695
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
Conversation
ffcda2d to
d042280
Compare
d042280 to
4ce2678
Compare
| <> | ||
| {option.name} | ||
| <Option.Meta> | ||
| <Span hue="grey">SN: {option.serialNumber}</Span> |
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.
(nit) Just a quick question regarding this: should this SN string be translated? We will probably want this to appear differently depending on the language.
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.
yes I've put it, thanks: #697
4ce2678 to
68674c0
Compare
| export interface TicketFieldOptionObject { | ||
| name: string; | ||
| value: string; | ||
| serialNumber?: string; |
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.
Where is this property coming from?
It doesn't seem to be a property of ticket-field-option which is the target of this type. If this is only valid for Service Catalog and ITAM please use a union.
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.
yes it was from Service Catalog, did union.
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.
ITAMAssetOptionObject only makes sense within the service-catalog context. It does not make sense in the context of new-request-form which is the other consumer of this shared package.
We don't want to have application specific logic in the shared packages so we need to find a way to avoid having to do this. Ideally the union would be placed on the service-catalog side.
| {t( | ||
| "cph-theme-ticket-fields.lookup-field.serial-number-label", | ||
| "SN:" | ||
| )}{" "} |
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.
You can probably pass the number as a parameter for the translation string, which saves you the trouble of doing this. Check this example from guide-client
It will also require changes in the yml file, just like this
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.
ok, done. Thanks for this.
68674c0 to
8e209ad
Compare
| export interface TicketFieldOptionObject { | ||
| name: string; | ||
| value: string; | ||
| serialNumber?: string; |
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.
ITAMAssetOptionObject only makes sense within the service-catalog context. It does not make sense in the context of new-request-form which is the other consumer of this shared package.
We don't want to have application specific logic in the shared packages so we need to find a way to avoid having to do this. Ideally the union would be placed on the service-catalog side.
af8f509 to
85bd8d0
Compare
luis-almeida
left a comment
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.
Thanks for addressing the feedback! 👍🏼
|
🎉 This PR is included in version 4.16.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Add a serial number to the dropdown in the end-user view to improve clarity and make it easier for users to distinguish between similar items:https://www.figma.com/design/2smlj3LkdOUZceDq4Q6shY/Service-catalog---after-GA?node-id=1009-37813&p=f&t=uqlgQpizgTmVMYmx-0
Jira
https://zendesk.atlassian.net/browse/PDSC-218
Screenshots
Checklist