8000 QoL Features for the List Item Modal by GODrums · Pull Request #327 · csfloat/extension · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 20 commits into from
May 21, 2025
Merged

Conversation

GODrums
Copy link
Collaborator
@GODrums GODrums commented May 17, 2025

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:

  • a link to get to CSFloat's /sell-page in case someone doesn't want to use / doesn't trust the modal
  • an informative banner linking CSFloat's blog article for auctions (similar to /sell)
  • an assessment label for the price (similar to /sell)
  • an option to create a private listing
  • a "search on market"-link to refer back to the market listings website
  • option to add a description to the listing (hidden behind a plus per default)

Screenshot

image
After clicking the "plus" for the description:
image

@GODrums GODrums requested review from Step7750 and Copilot May 17, 2025 20:21
@GODrums GODrums self-assigned this May 17, 2025
Copy link
Contributor
@Copilot Copilot AI left a 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 in list_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 missing aria-hidden="true" or other accessibility attributes; add aria-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 because pricePercentage is not a class property; define a reactive state for it or bind directly to the computed pricePercentage variable.
.value="${this.pricePercentage.toString()}"

GODrums and others added 2 commits May 17, 2025 22:24
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@GODrums GODrums moved this to In Review in Extension Work May 17, 2025
Copy link
Member
@Step7750 Step7750 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 these QOL features @GODrums !

@GODrums
Copy link
Collaborator Author
GODrums commented May 19, 2025

Updated the screenshot above according to the new styles.

Additionally, I added listing support for the new music kits and pins now in 74e0e03.
And it seemed like the charms-detection was broken as well. With 10ac9ad it should be fixed again.

@GODrums
Copy link
Collaborator Author
GODrums commented May 20, 2025

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).

@GODrums GODrums requested a review from Step7750 May 20, 2025 23:50
Copy link
Member
@Step7750 Step7750 left a 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

@GODrums GODrums merged commit c394572 into master May 21, 2025
2 checks passed
@GODrums GODrums deleted the feat/expanding-listing-modal branch May 21, 2025 22:10
@github-project-automation github-project-automation bot moved this from In Review to Done in Extension Work May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants
0