-
Notifications
You must be signed in to change notification settings - Fork 23
QoL Features for the List Item Modal #327
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
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.
Pull Request Overview
This PR enriches the list-item modal with feature parity to the /sell
page by adding new links, a blog banner, price assessment labels, and privacy toggles.
- Introduces new CSS rules for the auction info banner, percentage assessment, and visibility buttons.
- Implements
getPercentageAssessment
, renders SVG icons, and adds a private/public listing option. - Adds external links for “Search Similar Items” and “Prefer the website? Visit it here”.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/lib/components/inventory/list_item_modal_styles.ts | Added styles for percentage assessment, auction-info-banner, and visibility selector; refined colors and spacing. |
src/lib/components/inventory/list_item_modal.ts | Introduced SVG icons, isPrivate state, search URL getter, assessment logic, auction banner, visibility buttons, and external links. |
Comments suppressed due to low confidence (4)
src/lib/components/inventory/list_item_modal.ts:357
- The logic in
getPercentageAssessment
and its corresponding UI rendering lacks unit or integration tests; consider adding tests for each percentage range to verify correct labels, colors, and icons.
private getPercentageAssessment(percentage: number): {label: string; color: string; icon: string} {
src/lib/components/inventory/list_item_modal.ts:408
- The class
success-link
is applied here but not defined in the stylesheet; add a rule for it inlist_item_modal_styles.ts
or remove the unused class.
<a href="${this.searchUrl}" target="_blank" class="base-button secondary-button success-link">
src/lib/components/inventory/list_item_modal.ts:572
- SVG icons injected via
innerHTML
are missingaria-hidden="true"
or other accessibility attributes; addaria-hidden
to indicate these are decorative.
<div class="percentage-assessment-icon" .innerHTML="${percentageAssessment.icon}"></div>
src/lib/components/inventory/list_item_modal.ts:561
- Binding the slider to
this.pricePercentage
will fail becausepricePercentage
is not a class property; define a reactive state for it or bind directly to the computedpricePercentage
variable.
.value="${this.pricePercentage.toString()}"
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 these QOL features @GODrums !
Added a new description field now. Per default this it is hidden behind a "plus"-button to avoid overwhelming the user. I also fixed another issue from the original modal PR, which caused the slider to not be updated when manually entering a price (35a60b4). |
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 great @GODrums ! LGTM
Motivation
The new listing modal only contains a small subset of features from the website. Users may want more customization options.
Description
This PR adds new elements to the "list item"-modal to provide higher feature parity with the CSFloat website. This includes:
/sell
)/sell
)Screenshot
After clicking the "plus" for the description: