Skip to content

Fix asset search dropdown overlap, clipping, and vertical scrollbar - #361

Merged
tilakpatel22 merged 1 commit into
Fincept-Corporation:mainfrom
Sujallukhi04:fix/asset-dialog-dropdown
Jul 25, 2026
Merged

Fix asset search dropdown overlap, clipping, and vertical scrollbar#361
tilakpatel22 merged 1 commit into
Fincept-Corporation:mainfrom
Sujallukhi04:fix/asset-dialog-dropdown

Conversation

@Sujallukhi04

@Sujallukhi04 Sujallukhi04 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Scope gate (required)

  • This PR closes an issue that carries the good-first-issue, help-wanted, or scope:approved label.
  • I confirmed the scope with a maintainer on the issue before writing code.
  • This PR is from a topic branch (not main on my fork).
  • This PR makes one logical change. It does not bundle unrelated fixes.
  • I did not run Black / autopep8 / isort / clang-format / Prettier on files I did not otherwise modify.
  • Diff is minimal — no reformatting of surrounding lines that are unrelated to the change.

Fixes #361

What does this PR do?

Fixes the "Add Asset" dialog's ticker search suggestions dropdown rendering transparently, bleeding background elements, and getting clipped by the dialog's boundaries. It also caps the visible list height at 6 items and displays a custom scrollbar for overflow items.

Type of change

  • Bug fix
  • New feature / screen
  • Performance improvement
  • Refactoring (with linked issue)
  • Documentation (see CONTRIBUTING — docs-only PRs allowed only for genuine errors)
  • Build / config change

Changes made

  • fincept-qt/src/screens/portfolio/PortfolioDialogs.h: Included <QMoveEvent> and declared the moveEvent() override.
  • fincept-qt/src/screens/portfolio/PortfolioDialogs.cpp:
    • Configured search_frame_ as a top-level Qt::Tool window to bypass dialog boundary clipping and layout rendering collisions.
    • Instantiated and set a solid dark background on search_list_.
    • Parented cell row widgets directly to search_list_ for a correct widget hierarchy.
    • Implemented focus-loss auto-dismissal using qApp->focusChanged.
    • Capped the dropdown height to 6 items in position_dropdown() using global coordinates.
    • Implemented moveEvent() to update coordinates dynamically if the dialog is dragged on screen.

How to test

  1. Open the "Add Asset" dialog by clicking "OPEN BUY ORDER" on the Portfolio screen.
  2. Type a ticker query (e.g. AA) into the Symbol field to trigger the suggestion list.
  3. Verify that the dropdown has a solid background (no bleed-through of labels) and is not clipped on the right or bottom edges of the dialog.
  4. Verify that when suggestions exceed 6 items, it caps the height and displays a custom scrollbar.
  5. Drag the dialog window around and verify that the suggestions dropdown window moves with it.

Architecture / code-quality checklist

  • Builds without errors on my target platform (Windows)
  • UI thread is never blocked (no waitForFinished() on main thread) — see CLAUDE.md P1
  • Timers start/stop in showEvent() / hideEvent() — see P3
  • No raw QProcess for Python — used PythonRunner::instance().run() — see P4
  • No print() in Python scripts — used logger.info / logger.warning — see P14
  • No sensitive data (API keys, credentials) committed
  • DataHub rules (D1–D5) respected if touching data flow
  • Tested manually on: Windows

Screenshots / logs

Before:

image

After:

image

@github-actions

Copy link
Copy Markdown
Contributor

Hi @Sujallukhi04 — thanks for the PR!

Our automated scope gate flagged the following:

No scope-approved linked issue. This PR must close an issue that carries one of: good-first-issue, help-wanted, scope:approved. Link it in the PR body with Closes #NNN or via GitHub's "Linked issues" sidebar.

Please read CONTRIBUTING.md. Once an issue with the appropriate label exists and is linked here, re-run this check by pushing an empty commit or editing the PR description. A maintainer can also bypass this gate by adding the scope:approved label to this PR.

PRs that remain unresolved for 7 days will be closed automatically.

@github-actions github-actions Bot added the needs-scope-approval Auto-applied by pr-gate.yml to PRs that fail the scope gate. label Jul 24, 2026
@tilakpatel22
tilakpatel22 merged commit c4ea0da into Fincept-Corporation:main Jul 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-scope-approval Auto-applied by pr-gate.yml to PRs that fail the scope gate.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants