Skip to content

Conversation

@konradhopek-zen
Copy link
Contributor

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

Screenshot 2025-11-13 at 15 17 16

Checklist

  • 📗 all commit messages follow the conventional commits standard
  • ⬅️ changes are compatible with RTL direction
  • ♿ Changes to the UI are tested for accessibility and compliant with WCAG 2.1.
  • 📝 changes are tested in Chrome, Firefox, Safari and Edge
  • 📱 changes are responsive and tested in mobile
  • 👍 PR is approved by @zendesk/vikings

<>
{option.name}
<Option.Meta>
<Span hue="grey">SN: {option.serialNumber}</Span>
Copy link
Contributor

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.

Copy link
Contributor Author

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

export interface TicketFieldOptionObject {
name: string;
value: string;
serialNumber?: string;
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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:"
)}{" "}
Copy link
Contributor

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

Copy link
Contributor Author

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.

export interface TicketFieldOptionObject {
name: string;
value: string;
serialNumber?: string;
Copy link
Contributor

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.

Copy link
Contributor

@luis-almeida luis-almeida left a 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! 👍🏼

@konradhopek-zen konradhopek-zen merged commit 05acabc into master Nov 20, 2025
5 checks passed
@konradhopek-zen konradhopek-zen deleted the khopek/PDSC-218 branch November 20, 2025 15:34
@zd-svc-github-copenhagen-theme
Copy link
Collaborator

🎉 This PR is included in version 4.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

7 participants