Skip to content

refactor: introduce market domain for price-change display - #7813

Open
olerass wants to merge 1 commit into
developfrom
@ole/market-domain
Open

refactor: introduce market domain for price-change display#7813
olerass wants to merge 1 commit into
developfrom
@ole/market-domain

Conversation

@olerass

@olerass olerass commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

The price-change display helpers (percent formatting with directional arrows, the gain/loss color mapping) currently live under framework/, which is reserved for code with no domain knowledge. Up-arrow-means-gain and green-means-up are market display conventions, not app-agnostic infrastructure. The current placement violates upcoming dependency rules (framework cannot depend on anything outside it, except npm libs).

This change introduces a features/market domain and moves them there, layered from the start (ui/ only; no data or core exists yet) with the React hook split from the pure color helpers. Consumers in discover and perps are rewired.

Scope note: the app currently renders price trends several inconsistent ways (SF-symbol arrows here, an up-arrow/hyphen pair in king-of-the-hill, sign-driven arrow rotation in the legacy chart label). This PR only relocates the most-shared variant; aligning on one model is separate design work, which now has an owning domain to consolidate into.

Ref APP-4084.

@linear

linear Bot commented Sep 3, 2026

Copy link
Copy Markdown

APP-4084

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 14 files

Re-trigger cubic

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

Launch in simulator or device for 4765802

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant