-
Notifications
You must be signed in to change notification settings - Fork 70
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
fix: Align the main headings on the data model page #13786
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13786 +/- ##
==========================================
- Coverage 94.57% 94.57% -0.01%
==========================================
Files 1624 1624
Lines 21817 21813 -4
Branches 2572 2572
==========================================
- Hits 20634 20630 -4
+ Misses 940 939 -1
- Partials 243 244 +1 ☔ View full report in Codecov by Sentry. |
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.
Alt i alt fin opprydning!
Hvis vi skal følge konvensjonen for endringstitler, viser style
til endringer i kodeformat. fix
er nok mer passende her.
border-bottom-left-radius: 0; | ||
border-left-color: transparent; | ||
border-left-style: solid; | ||
border-left-width: var(--studio-treeitem-vertical-line-width); | ||
border-top-left-radius: 0; | ||
display: flex; | ||
font: var(--fds-typography-paragraph-short-large); | ||
min-height: var(--fds-sizing-12); |
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.
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.
Oi, det var ikke meningen. Bra du fanget det opp!
Ser at dette må være tilstede:
display: flex;
font: var(--fds-typography-paragraph-short-large);
border-left-width: var(--studio-treeitem-vertical-line-width);
border-top-left-radius: 0;
border-bottom-left-radius: 0;
Mens det virker som om dette ikke har noen funksjon:
border-left-color: transparent;
border-left-style: solid;
Bør være greit å ta vekk, eller?
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.
Jeg tror faktisk de to linjene også må være der. Når det står border-color: transparent
, er det ofte for å hindre at ting flytter på seg når konturen blir borte eller dukker opp. Her skjer det når brukeren bytter mellom valgt / ikke valgt.
Eventuelt kunne vi valgt en helt annen fremgangsmåte her, f.eks. med background
med linear-gradient
eller med box-shadow
. Da kan vi unngå denne litt uheldige effekten av å bruke border
:
{!isDataModelRoot && <BackButton />} | ||
<HeadingRow schemaPointer={schemaPointer} /> | ||
<HeadingRow schemaPointer={schemaPointer} /> | ||
{!isDataModelRoot && <BackButton />} |
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.
Jeg er usikker på om vi burde plassere <BackButton>
under overskriften. Blir det semantisk riktig? Dette er jo ikke innhold som er spesifikt for akkurat denne overskriften.
it('displays a message when no node is selected', () => { | ||
renderSchemaInspector(mockUiSchema); | ||
|
||
const noSelectionHeader = screen.getByRole('heading', { | ||
name: textMock('schema_editor.properties'), | ||
}); | ||
const noSelectionParagraph = screen.getByText(textMock('schema_editor.no_item_selected')); | ||
|
||
expect(noSelectionHeader).toBeInTheDocument(); | ||
expect(noSelectionParagraph).toBeInTheDocument(); | ||
}); |
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.
Fin test! Synes bare variablenavnet noSelectionHeader
kan virke litt forvirrende, siden den bare sier "Egenskaper". Hva med propertiesHeader
? Dette er småpirk.
<Tabs.Content value={t('schema_editor.fields')}> | ||
<Alert severity='info'>{t('app_data_modelling.fields_information')}</Alert> | ||
</Tabs.Content> |
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.
Fint at du fikk plassert denne i en <Tabs.Content>
! Kanskje du også kan flytte inn hele shouldDisplayFieldsTab
-sjekken, siden det ikke er noen forskjell på de to <Tabs.Content>
-ene?
Description
Changes:
StudioHeading
for the headings.SchemaInspector
, in order to place both return statements in the bottom of the component.collapsed
prop in the resizable layout that wraps aroundSchemaInspector
, so that the width of the column is the same width, regardless if a node is selected.Before
After
Verification