Skip to content

Replace test-deal buttons with a Sample deals dropdown - #380

Merged
tameware merged 2 commits into
dds-bridge:developfrom
tameware:refactor-front-end
Sep 15, 2026
Merged

tameware merged 2 commits into
dds-bridge:developfrom
tameware:refactor-front-end

Conversation

@tameware

@tameware tameware commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replace the three test-deal toolbar buttons with a single Sample deals… dropdown (NS make 7, Everyone makes 3N, Part-score).
  • Style toolbar buttons and the dropdown with the same flat 1px chrome; the select keeps a chevron as its only visual difference.
  • Update HTML/JS unit tests and e2e helpers for the new control.

Test plan

  • Load DDS Web and confirm Clear / Import / Sample deals / Rotate share the same flat button look
  • Choose each Sample deals option and confirm the corresponding deal loads, then the placeholder returns
  • Re-select the same sample after editing and confirm it loads again
  • python3 -m unittest web.tests.test_web_html
  • node --test web/tests/dds_web_test.mjs

Made with Cursor

Collapse the sample deals into one flat toolbar control styled like the
other buttons, with a chevron as the only difference.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No blocking issues were identified; the remaining test-coverage note is a minor nit.

Pull request overview

Replaces three sample-deal buttons with a styled Sample deals… dropdown and updates related tests.

Changes:

  • Added dropdown markup and selection handling.
  • Applied shared flat toolbar styling with a chevron.
  • Updated HTML, unit, and e2e tests.
File summaries
File Summary
web/tests/test_web_html.py Validates dropdown markup.
web/tests/test_web_e2e.py Updates browser helpers and scenarios.
web/tests/dds_web_test.mjs Tests selection behavior and styling.
web/dds_web.js Loads samples and resets the placeholder.
web/dds_web.html Replaces sample buttons with dropdown options.
web/dds_web.css Adds shared toolbar styling.
Review details

Suppressed comments (1)

web/dds_web.js:895

  • The new behavior is intended to let a user choose the same sample again after editing, but the added tests only invoke the handler once and assert that the select resets. None of the browser tests selects a sample, edits a hand, and selects that same option again; add that regression case so the user-visible behavior behind this reset is covered.
    select.value = "";
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tameware tameware self-assigned this Sep 14, 2026
The dropdown resets to its placeholder so the same sample can be chosen
again; add unit and e2e coverage for that user-visible behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware

Copy link
Copy Markdown
Collaborator Author

Addressed the Copilot coverage note: added unit and e2e coverage that loads a sample deal, edits a hand, then selects the same Sample deals option again (depends on resetting the select to the placeholder).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved blocking issues were identified.

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@tameware tameware added the Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments. label Sep 14, 2026
@tameware
tameware requested a review from tzimnoch September 14, 2026 19:37
@tameware
tameware merged commit 53cb54b into dds-bridge:develop Sep 15, 2026
12 checks passed
@tameware
tameware deleted the refactor-front-end branch September 15, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Copilot review Copilot reviewed and had neither new comments nor new suppressed comments.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants