Skip to content

Commit

Permalink
Content checks results redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
albinazs committed Jun 6, 2024
1 parent a7798c1 commit bda21b3
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 20 deletions.
35 changes: 22 additions & 13 deletions client/scss/components/_a11y-result.scss
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
.w-a11y-result__row {
border-top: 1px solid theme('colors.border-furniture');
@include box;
padding: theme('spacing.4');
}

.w-a11y-result__header {
margin: 0;
padding: theme('spacing.4') theme('spacing.5');
width: 100%;
display: flex;
justify-content: space-between;
gap: theme('spacing.2');
font: inherit;
font-weight: theme('fontWeight.bold');
font-size: theme('fontSize.14');

.w-dialog--userbar & {
font-size: theme('fontSize.16');
}
}

.w-a11y-result__name {
color: theme('colors.text-label');
color: theme('colors.text-context');
font-weight: theme('fontWeight.semibold');
}

.w-a11y-result__container {
display: flex;
flex-wrap: wrap;
padding: 0 theme('spacing.5') theme('spacing.5') theme('spacing.5');
gap: theme('spacing.[2.5]');
padding-top: theme('spacing.3');
}

.w-a11y-result__subtotal_count {
color: theme('colors.text-context');
color: theme('colors.icon-primary');
width: theme('spacing.5');
text-align: center;
font-size: theme('fontSize.11');
font-weight: theme('fontWeight.normal');

.w-dialog--userbar & {
font-size: theme('fontSize.14');
}
}

.w-a11y-result__selector {
Expand All @@ -35,8 +46,6 @@
background: theme('colors.surface-field-inactive');
color: theme('colors.text-context');
border-radius: theme('borderRadius.DEFAULT');
margin-inline-end: theme('spacing.[2.5]');
margin-bottom: theme('spacing.[2.5]');
padding: theme('spacing.[1.5]');

&:hover,
Expand All @@ -59,7 +68,7 @@
fill: theme('colors.surface-button-default');
height: theme('spacing.[3.5]');
width: theme('spacing.[3.5]');
margin-inline-end: theme('spacing.[2.5]');
margin-inline-end: theme('spacing.[1.5]');
}

.w-a11y-result__count {
Expand All @@ -69,10 +78,10 @@
align-items: center;
background-color: theme('colors.positive.100');
border-radius: theme('borderRadius.full');
font-size: theme('fontSize.14');
font-size: theme('fontSize.11');
line-height: theme('lineHeight.none');
height: theme('spacing.5');
width: theme('spacing.5');
height: theme('spacing.4');
width: theme('spacing.4');
color: theme('colors.text-button');

&.has-errors {
Expand Down
13 changes: 11 additions & 2 deletions client/scss/components/_userbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ $positions: (
padding: 0;
min-height: unset;
max-height: 60vh;
font-size: theme('fontSize.14');
}

.w-dialog__header {
Expand All @@ -247,15 +248,23 @@ $positions: (
justify-content: space-between;
}

.w-dialog__body {
padding: 0 theme('spacing.[7.5]') theme('spacing.[7.5]');
display: flex;
flex-direction: column;
gap: theme('spacing.[2.5]');
}

.w-dialog__title {
@apply w-h3;
padding: theme('spacing.4') theme('spacing.5');
color: theme('colors.text-context');
padding: theme('spacing.[7.5]');
margin-bottom: 0;
}

.w-dialog__subtitle {
@apply w-body-text;
padding-inline-end: theme('spacing.5');
padding-inline-end: theme('spacing.[7.5]');
display: flex;
align-items: center;
gap: theme('spacing.2');
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/CommentApp/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $color-comment-separator: theme('colors.border-furniture');

$color-box-background: theme('colors.surface-page');
$color-box-background-focused: theme('colors.surface-page');
$color-box-border: theme('colors.border-field-default');
$color-box-border: theme('colors.border-furniture');
$color-box-border-focused: theme('colors.border-field-hover');
$color-box-text: theme('colors.text-context');
$box-border-radius: 5px;
Expand Down
1 change: 1 addition & 0 deletions client/src/tokens/typography.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const fontFamily = {
* These values are used in combinations create typography defaults
*/
const fontSize = {
11: '0.6875rem',
14: '0.875rem',
15: '0.9375rem',
16: '1rem',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h2 class="w-dialog__title w-h1" id="title-{{ id }}">
{% endif %}
</div>

<div data-w-dialog-target="body">
<div class="w-dialog__body" data-w-dialog-target="body">
{{ children }}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
w-whitespace-nowrap
w-px-1
w-ml-3
w-text-[0.6875rem]
w-text-11
w-rounded-sm
w-bg-transparent
w-text-text-meta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h3 class="w-a11y-result__header">
</template>

<div class="w-mt-12">
<h2 class="w-flex w-items-center w-gap-2"><span>{% trans 'Issues found' %}</span><span class="w-a11y-result__count" data-a11y-result-count>0</span></h2>
<div data-checks-panel></div>
<h2 class="w-flex w-items-center w-gap-2 w-my-5 w-text-16 w-font-bold"><span>{% trans 'Issues found' %}</span><span class="w-a11y-result__count" data-a11y-result-count>0</span></h2>
<div class="w-flex w-flex-col w-gap-2.5" data-checks-panel></div>
</div>
{{ axe_configuration|json_script:"accessibility-axe-configuration" }}

0 comments on commit bda21b3

Please sign in to comment.