Repository navigation
feat(v2): Settings frame from the D223 primitives (TASK-730) #3225
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| import React from 'react'; | ||
|
|
||
| // TASK-730 (D223): the d215 Settings frame (#s-settings) rebuilt from the | ||
| // shared primitives alone. Same groups, rows and order as the artboard; the | ||
| // values are fixtures, so the structural diff is what this proves. | ||
| const seg = (items: string[], on: string, label: string) => ( | ||
| <div className="v2p-seg v2p-seg--sm" role="group" aria-label={label}> | ||
| {items.map((t) => ( | ||
| <button key={t} type="button" className={t === on ? 'on' : undefined}>{t}</button> | ||
| ))} | ||
| </div> | ||
| ); | ||
|
|
||
| const V2SettingsFrame: React.FC = () => ( | ||
| <div className="v2p-frame" data-testid="v2p-settings-frame" style={{ width: '100%', maxWidth: 760, margin: '0 auto' }}> | ||
| <div className="v2p-gtitle">Account</div> | ||
| <div className="v2p-list"> | ||
| <div className="v2p-lrow" style={{ minHeight: 64 }}> | ||
| <div className="lb">alex-kim</div> | ||
| <div className="vl"><span className="mo">@alex-kim · member</span></div> | ||
| <div className="ac"> | ||
| <button type="button" className="v2p-b v2p-b-g v2p-b-sm v2p-ib" aria-label="Edit name and username">✎</button> | ||
| </div> | ||
| </div> | ||
| <div className="v2p-lrow"> | ||
| <div className="lb">Email</div> | ||
| <div className="vl"><span className="mo">[email]</span></div> | ||
| <div className="ac"> | ||
| <button type="button" className="v2p-b v2p-b-g v2p-b-sm v2p-ib" aria-label="Change email">✎</button> | ||
| </div> | ||
| </div> | ||
| <div className="v2p-lrow"> | ||
| <div className="lb">Plan</div> | ||
| <div className="vl">Pro<span className="mo">$12 a month</span></div> | ||
| <div className="ac"><button type="button" className="v2p-b v2p-b-g v2p-b-sm">Billing</button></div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div className="v2p-gtitle">Access</div> | ||
| <div className="v2p-list"> | ||
| <details className="v2p-disc"> | ||
| <summary> | ||
| <span className="lb">Devices</span> | ||
| <span className="vl">1 CLI device<span className="mo">used 1:21 AM</span></span> | ||
| <svg className="chev" viewBox="0 0 24 24" aria-hidden="true"><path d="m6 9 6 6 6-6" /></svg> | ||
| </summary> | ||
| <div className="v2p-body">alex-laptop · last used 1:21 AM</div> | ||
| </details> | ||
| <div className="v2p-lrow"> | ||
| <div className="lb">API token</div> | ||
| <div className="vl"><span className="mo">None</span></div> | ||
| <div className="ac"><button type="button" className="v2p-b v2p-b-s v2p-b-sm">Generate</button></div> | ||
| </div> | ||
| <div className="v2p-lrow"> | ||
| <div className="lb">Connectors</div> | ||
| <div className="vl"><span className="mo">0 connected</span></div> | ||
| <div className="ac"> | ||
| <button type="button" className="v2p-b v2p-b-g v2p-b-sm v2p-ib" aria-label="Open Connectors">›</button> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div className="v2p-gtitle">Look</div> | ||
| <div className="v2p-list"> | ||
| <div className="v2p-lrow"> | ||
| <div className="lb">Language</div> | ||
| <div className="vl" /> | ||
| <div className="ac">{seg(['EN', '中文'], 'EN', 'Language')}</div> | ||
| </div> | ||
| <div className="v2p-lrow"> | ||
| <div className="lb">Theme</div> | ||
| <div className="vl" /> | ||
| <div className="ac">{seg(['Auto', 'Light', 'Dark'], 'Auto', 'Theme')}</div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
|
|
||
| export default V2SettingsFrame; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Script executed:
Repository: Team-Commonly/commonly
Length of output: 45656
Script executed:
Repository: Team-Commonly/commonly
Length of output: 31704
Script executed:
Repository: Team-Commonly/commonly
Length of output: 35249
Script executed:
Repository: Team-Commonly/commonly
Length of output: 35246
Guard both phone-specific layout rules in
v2-layout-invariants.test.ts.The changed row and disclosure rules control the phone grid layout. The current regexes are not scoped to those rules. They can pass when either rule is removed or moved outside the phone media query.
Add scoped presence assertions for both rules in
frontend/src/v2/__tests__/v2-layout-invariants.test.ts, as required for load-bearing v2 layout CSS.