Skip to content

Commit 0659332

Browse files
Merge pull request #370 from mxenabled/wes/CT-2472/MXLogo
Wes/ct 2472/mx logo
2 parents 8a07282 + 608d33e commit 0659332

9 files changed

Lines changed: 68 additions & 64 deletions

File tree

.claude/skills/adr-review/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ skill can review either — it always evaluates against the connect-widget ADRs.
1515
## Scope: what to review
1616

1717
Review **only the code the PR adds or changes** (the diff), not the whole repo. ADR
18-
0002 states that a PR is judged on whether its *new* code adheres to the ADRs; you
18+
0002 states that a PR is judged on whether its _new_ code adheres to the ADRs; you
1919
are not auditing pre-existing code except where the PR modifies it. When a PR edits a
2020
line that was already non-conforming, note that conforming it would be ideal but is
2121
not blocking unless the PR is making that area worse.
@@ -80,6 +80,7 @@ check every applicable ADR. Only flag things you can point to in the diff. Prefe
8080
being specific and actionable over exhaustive nitpicking.
8181

8282
Assign each finding a severity:
83+
8384
- **Blocking** — clearly violates an ADR's decision (would fail review per ADR 0002).
8485
- **Should fix** — likely violation or strongly discouraged pattern; confirm intent.
8586
- **Consider** — judgment call, style, or a heads-up (e.g. PR getting large).
@@ -123,4 +124,4 @@ confidence the review was real. If nothing in the diff is in scope for a given A
123124
as "acceptable only if this is an urgent hotfix — file a follow-up ticket."
124125
- **Legacy code:** the repo is mid-migration (e.g. `@kyper/*` → MXUI). Editing legacy
125126
files doesn't require rewriting them, but new code must conform.
126-
- Keep the review grounded in the *diff* — never invent violations you can't cite.
127+
- Keep the review grounded in the _diff_ — never invent violations you can't cite.

.claude/skills/adr-review/reference/adr-checklist.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Check added/changed `.tsx`/`.jsx`/`.css` code:
3535
- **CSS Modules required.** New stylesheets must be `*.module.css` and imported as a
3636
module (`import styles from './Foo.module.css'`). Flag new plain `.css`/global CSS
3737
files, or Tailwind / other global CSS-framework classes, or styled-components.
38-
- **No `sx` prop for styling.** Flag `sx={...}` on MUI/MXUI components. *Exception:*
38+
- **No `sx` prop for styling.** Flag `sx={...}` on MUI/MXUI components. _Exception:_
3939
`xs` is allowed **only** for breakpoint-specific code (MUI doesn't expose breakpoints
4040
as CSS variables). Ordinary styling via `sx`/`xs` → move to a CSS Module.
4141
- **Spacing between elements → MUI `<Stack spacing={n}>`.** Flag margins/padding added
@@ -102,7 +102,7 @@ used together in close proximity; move code to `shared/` only once actually shar
102102
`shared/` that only one domain uses (premature sharing).
103103

104104
Because the current repo is mid-migration, treat structure findings as guidance for
105-
*new* domains/files rather than demanding relocation of existing ones.
105+
_new_ domains/files rather than demanding relocation of existing ones.
106106

107107
---
108108

GEMINI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The project relies on standard npm scripts for development, building, and testin
2323
- **Development Build (Watch Mode):** `npm run dev`
2424
- **Production Build:** `npm run build`
2525
- **Run Tests:** `npm run test`
26-
- **Watch Tests:** `npm run watch`
26+
- **Watch Tests:** `npm run test:watch`
2727
- **Lint Code:** `npm run lint`
2828
- **Link locally:** Use `npm link` in the root and then `npm link @mxenabled/connect-widget` in the consuming application to test local changes.
2929

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"prepare": "husky",
3333
"test": "vitest run",
3434
"test:coverage": "vitest run --coverage",
35-
"watch": "vitest",
35+
"test:watch": "vitest",
3636
"i18n": "node scripts/i18n.js",
3737
"logBuildDate": "echo 'Last build: '$(date \"+%c\") | tee ./dist/lastBuild.txt",
3838
"testAndBuild": "npm run test && npm run build",

src/views/disclosure/PoweredByMXText.js

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.text:global(.MuiTypography-root) {
2+
color: var(--mui-palette-text-secondary);
3+
}
4+
5+
.accessibleAriaLabel {
6+
position: absolute;
7+
color: transparent;
8+
overflow: hidden;
9+
user-select: none;
10+
-ms-user-select: none;
11+
-moz-user-select: none;
12+
-webkit-user-select: none;
13+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
import { describe, expect, it } from 'vitest'
3+
import { render, screen } from 'src/utilities/testingLibrary'
4+
import PoweredByMXText from 'src/views/disclosure/PoweredByMXText'
5+
6+
describe('<PoweredByMXText />', () => {
7+
it('renders the visible "Data access by" text with an aria hidden, the logo, and the full string for screen readers', () => {
8+
const { container } = render(<PoweredByMXText />)
9+
10+
expect(screen.getByText('Data access by')).toHaveAttribute('aria-hidden', 'true')
11+
expect(screen.getByText('Data access by MX')).toBeInTheDocument()
12+
13+
expect(container.querySelector('svg')).toBeInTheDocument()
14+
})
15+
})
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import React from 'react'
2+
import { MXLogoIcon, Text } from '@mxenabled/mxui'
3+
4+
import { __ } from 'src/utilities/Intl'
5+
import { Stack, useTheme } from '@mui/material'
6+
import styles from 'src/views/disclosure/PoweredByMXText.module.css'
7+
8+
const PoweredByMXText = () => {
9+
const theme = useTheme()
10+
11+
return (
12+
<Stack alignItems="center" direction="row" justifyContent="center" spacing={0.5}>
13+
<Text
14+
aria-hidden={true}
15+
bold={true}
16+
className={styles.text}
17+
component="span"
18+
truncate={false}
19+
variant="Small"
20+
>
21+
{
22+
// --TR: Full string "Data access by MX(Logo)"
23+
__('Data access by')
24+
}{' '}
25+
</Text>
26+
<MXLogoIcon color={theme.palette.text.primary} size={25} />
27+
<span className={styles.accessibleAriaLabel}>{`${__('Data access by')} MX`}</span>
28+
</Stack>
29+
)
30+
}
31+
32+
export default PoweredByMXText

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export default defineConfig({
8686
globals: true,
8787
environment: 'jsdom',
8888
setupFiles: './src/testSetup.ts',
89-
include: ['**/*-{test,spec}.?(c|m)[jt]s?(x)'],
89+
include: ['**/*-{test,spec}.?(c|m)[jt]s?(x)', '**/*.{test,spec}.?(c|m)[jt]s?(x)'],
9090
server: {
9191
deps: {
9292
inline: ['@mxenabled/mx-icons'],

0 commit comments

Comments
 (0)