Skip to content

Commit

Permalink
Merge pull request #173 from JudicialCouncilOfCalifornia/DCAS-166-fix…
Browse files Browse the repository at this point in the history
…-php-and-twig-warnings-and-notices

[DCAS-166] -- Alter the ResultExcerpt component to help address some twig/php notices and warnings showing in the logs
  • Loading branch information
paboden authored Dec 21, 2023
2 parents 0078157 + 3d1a2c7 commit cd20883
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
7 changes: 4 additions & 3 deletions src/stories/Molecules/ResultExcerpt/ResultExcerpt.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.result-excerpt__header {
overflow: hidden;
/* align-items: center; */
--gap: var(--s1)
--gap: var(--s1);
}

.result-excerpt__brow {
Expand Down Expand Up @@ -46,12 +46,13 @@
/* Media headings must always appear as H4 visually. */
.result-excerpt__heading {
font-size: var(--s1);
line-height: var(--s3);
}

.result-excerpt__button {
/* Negative margin hides border when wrapped. */
/* margin-inline-start: -1px; */
border-inline-start: 1px solid var(--color-base);
/* border-inline-start: 1px solid var(--color-base); */
padding-inline: var(--s1);
display: flex;
flex-shrink: 1;
Expand All @@ -71,7 +72,7 @@
}

.result-excerpt__content {
margin-block-start: var(--s-6);
margin-block-start: var(--s0);
}

.result-excerpt__content.stack > * + * {
Expand Down
17 changes: 14 additions & 3 deletions src/stories/Molecules/ResultExcerpt/ResultExcerpt.data.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// import '../../../js/detectWrap.js';
import Pills from "../../Molecules/Pills/Pills.twig";
import { Default as PillsDefault } from "../../Molecules/Pills/Pills.stories";
import Pill from "../../Atoms/Pill/Pill.twig";
import { Default as PillDefault } from "../../Atoms/Pill/Pill.stories";

export default {
default: {
Expand Down Expand Up @@ -32,6 +32,17 @@ export default {
"Report",
],
},
pills: Pills({ ...PillsDefault.args }),
pills: {
variant: "default",
icon_data: {
icon: "translation",
color: false,
},
items: [
Pill({ ...PillDefault.args }),
Pill({ ...PillDefault.args }),
Pill({ ...PillDefault.args }),
],
},
},
};
4 changes: 2 additions & 2 deletions src/stories/Molecules/ResultExcerpt/ResultExcerpt.twig
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

{% if detail_list_data or pills or content %}
<div class="result-excerpt__content stack">
{{ content }}
<div>{{ content }}</div>

{% if detail_list_data or pills %}
{% if detail_list_data %}
Expand All @@ -61,7 +61,7 @@
{% endif %}
{% if pills %}
<div class="result-excerpt__pills">
{{ pills }}
{% include "@molecules/Pills/Pills.twig" with pills %}
</div>
{% endif %}
{% endif %}
Expand Down

0 comments on commit cd20883

Please sign in to comment.