diff --git a/.changeset/violet-keys-burn.md b/.changeset/violet-keys-burn.md new file mode 100644 index 0000000000..0ee3870a90 --- /dev/null +++ b/.changeset/violet-keys-burn.md @@ -0,0 +1,6 @@ +--- +"@stackoverflow/stacks": minor +"@stackoverflow/stacks-svelte": minor +--- + +Update Post Summary to SHINE styles diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 379e87bb1b..6a0ada742f 100755 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -137,6 +137,9 @@ The menu component has been updated to use new class names and structure. The fo #### Pagination - The next and previous button now uses an `ArrowRight` and `ArrowLeft` icon instead of text. To apply the new styling, use the class `.s-pagination--item__nav`. Since these buttons use icons to represent their behavior, make sure to include descriptive text for screen readers. +#### Post Summary +The Post Summary component has changed dramatically. Please refer to the docs for complete guidance. + #### Popover - The new popovers no longer include an arrow element. The `s-popover--arrow` css class has been removed, and any markup using it (e.g. `
`) should be deleted from the codebases as part of the migration. diff --git a/packages/stacks-classic/lib/components/post-summary/post-summary.a11y.test.ts b/packages/stacks-classic/lib/components/post-summary/post-summary.a11y.test.ts index bb1fe41fc5..d95515cbd2 100644 --- a/packages/stacks-classic/lib/components/post-summary/post-summary.a11y.test.ts +++ b/packages/stacks-classic/lib/components/post-summary/post-summary.a11y.test.ts @@ -1,26 +1,7 @@ -// TODO SPARK reinstate accessibility tests once component styles are updated -// import { runA11yTests } from "../../test/a11y-test-utils"; -// import testArgs from "./post-summary.test.setup"; -// import "../../index"; +import { runA11yTests } from "../../test/a11y-test-utils"; +import testArgs from "./post-summary.test.setup"; +import "../../index"; -// describe("post-summary", () => { -// // Base, sparce -// runA11yTests({ -// ...testArgs.base, -// // TODO resolve test failures -// skippedTestids: [ -// /-deleted/, -// /-ignored/, -// /-highcontrast-(light|dark)-watched/, -// ], -// }); - -// // Truncated description sizes -// runA11yTests(testArgs.sizes); - -// // Stats - answers, view hotness -// runA11yTests(testArgs.stats); - -// // Badges -// runA11yTests(testArgs.badges); -// }); +describe("post-summary", () => { + runA11yTests(testArgs); +}); diff --git a/packages/stacks-classic/lib/components/post-summary/post-summary.less b/packages/stacks-classic/lib/components/post-summary/post-summary.less index c52328047f..a6a8e75217 100644 --- a/packages/stacks-classic/lib/components/post-summary/post-summary.less +++ b/packages/stacks-classic/lib/components/post-summary/post-summary.less @@ -1,458 +1,291 @@ .s-post-summary { - // --_ps-state-* are custom properties to broadly override colors for a given post summary state - --_ps-bb: var(--su1) solid var(--bc-light); - --_ps-bg: unset; - --_ps-o: unset; - // Child components - --_ps-content-excerpt-fc: var(--_ps-state-fc, var(--fc-medium)); - --_ps-content-title-a-fc: var(--_ps-state-fc, var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary)))); - --_ps-content-title-a-fc-hover: var(--_ps-state-fc, var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500)))); - --_ps-content-title-a-fc-visited: var(--_ps-state-fc, var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--purple-500)))); - --_ps-content-title-a-fc-hover-visited: var(--_ps-state-fc, var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--purple-600)))); - --_ps-stats-ai: flex-end; - --_ps-stats-fc: var(--_ps-state-fc, var(--fc-light)); - --_ps-stats-fd: column; - --_ps-stats-w: calc(var(--su96) + var(--su12)); - // Stats item modifiers - --_ps-has-answers-bc: var(--green-400); - --_ps-has-answers-bg: unset; - --_ps-has-answers-fc: var(--green-400); - --_ps-has-accepted-answers-bc: var(--green-400); - --_ps-has-accepted-answers-bg: var(--green-400); - --_ps-has-accepted-answers-fc: var(--white); - --_ps-stats-item-emphasized-fc: var(--_ps-state-fc, var(--fc-dark)); - - // CONTEXTUAL STYLES - #stacks-internals #screen-md({ - --_ps-stats-ai: center; - --_ps-stats-fd: row; - --_ps-stats-w: auto; - - flex-direction: column; + @psx-container-sm: 28rem; + --_ps-answer-icon-fc: unset; + --_ps-content-type-bc: var(--black-200); + --_ps-content-type-bg: var(--black-050); + --_ps-content-type-fc: var(--black-600); + --_ps-stats-answers-bg: unset; + --_ps-stats-answers-fc: var(--black-400); + --_ps-stats-answers-fw: unset; + --_ps-stats-answers-icon-fc: unset; + --_ps-title-link-fc: var(--theme-secondary-600); + + // Conditional styles + .highcontrast-mode({ + &__deleted * { + --_ps-ignored-fc: var(--black-500); + } }); - // MODIFIERS - &&__minimal, - & &--answer { - --_ps-stats-ai: center; - --_ps-stats-fd: row; - --_ps-stats-w: auto; + // Note: we cannot use CSS custom properties for container query values + @container post-summary (width <= @psx-container-sm) { + .s-post-summary--sm-hide { + display: none !important; + } + .s-post-summary--sm-show { + display: flex !important; + } } - &&__minimal { - .s-post-summary--content { - width: 100%; + @container post-summary (width > @psx-container-sm) { + .s-post-summary--sm-hide { + display: flex !important; + } + .s-post-summary--sm-show { + display: none !important; } + } - flex-direction: column; + // MODIFIERS + &&__answered { + --_ps-stats-answers-bg: var(--green-400); + --_ps-stats-answers-fc: var(--white); + --_ps-stats-answers-fw: 600; + --_ps-stats-answers-icon-fc: var(--green-400); } - // VARIANTS &&__deleted, - &&__ignored { - --_ps-o: 0.75; - --_ps-has-answers-bc: var(--black-350); - --_ps-has-answers-bg: transparent; - --_ps-has-answers-fc: var(--_ps-state-fc); - --_ps-has-accepted-answers-bc: transparent; - --_ps-has-accepted-answers-bg: var(--black-150); - --_ps-has-accepted-answers-fc: var(--_ps-state-fc); - --_ps-meta-tags-tag-bg: var(--black-150); - --_ps-meta-tags-tag-fc: var(--_ps-state-fc); - --_ps-state-fc: var(--black-400); - - .s-post-summary--meta-tags { - a, // TODO: remove rule for `a` once Core replaces `.post-tag` with `.s-tag` - .post-tag, - .s-tag { - &, - &:active, - &:hover, - &:focus, - .focus-bordered { - .highcontrast-mode({ - border-color: currentColor; - }); - - background-color: var(--_ps-meta-tags-tag-bg); - color: var(--black-500); - border-color: var(--black-300); - } - } + &:has(.s-tag.s-tag__ignored) { + --_ps-ignored-bg: var(--black-100); + --_ps-ignored-fc: var(--black-400); + + &.s-post-summary__answered { + --_ps-stats-answers-bg: var(--_ps-ignored-bg); + --_ps-stats-answers-fc: var(--_ps-ignored-fc); + --_ps-stats-answers-icon-fc: var(--black-350); } - .s-user-card { - a, - .s-user-card--link, - .s-user-card--rep, - .s-user-card--time { - color: var(--_ps-state-fc); - } - - .s-badge { - filter: grayscale(100%); - } + * { + color: var(--_ps-ignored-fc) !important; } - } - &&__deleted, - &&__watched { - background-color: var(--_ps-bg); - } - &&__deleted { - --_ps-bg: var(--red-100); - --_ps-has-accepted-answers-bg: var(--black-200); - --_ps-has-accepted-answers-fc: var(--black-500); - --_ps-meta-tags-tag-bg: var(--black-200); - - .is-deleted, - .s-badge__danger.s-badge__filled { - .dark-mode({ - background-color: var(--red-600); - color: var(--white); - }); + .s-avatar { + opacity: 0.5; + } - background-color: var(--red-500); + .s-user-card--rep .s-bling:before { + background-color: var(--_ps-ignored-fc) !important; } - } - &&__watched { - &:not(.s-post-summary__deleted):not(.s-post-summary__ignored) { - --_ps-bg: var(--yellow-100); - --_ps-stats-fc: var(--black-400); - --_ps-content-title-a-fc: var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary))); - --_ps-content-title-a-fc-hover: var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500))); - --_ps-content-title-a-fc-visited: var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--purple-500))); - --_ps-content-title-a-fc-hover-visited: var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--purple-600))); - - .s-user-card { - a { - &:active, - &:hover { - color: var(--_ps-content-title-a-fc-hover); - } - - &:visited { - &:hover { - color: var(--_ps-content-title-a-fc-hover-visited); - } - - color: var(--_ps-content-title-a-fc-visited); - } - - color: var(--_ps-content-title-a-fc); - } - - .s-user-card--rep, - .s-user-card--time { - color: var(--black-500); - } - } + .s-badge, + .s-tag, + .s-post-summary--stats-bounty { + background-color: var(--_ps-ignored-bg) !important; + border-color: var(--_ps-ignored-bg) !important; + color: var(--_ps-ignored-fc) !important; } } - &:last-child { - --_ps-bb: none; + &&__deleted { + background-color: var(--red-100); + border: var(--su8) solid var(--red-100); } - // Child Elements - & & { - &--answer { - & + & { - margin-top: var(--su16); - } + // Child components + .s-tag.s-tag__watched { + --_ta-bc: var(--yellow-200); + --_ta-bg: var(--yellow-200); + --_ta-fc: var(--yellow-600); + --_ta-bc-hover: var(--yellow-200); + --_ta-bg-hover: var(--yellow-200); + } - &:before { - .highcontrast-mode({ - background: var(--black-500); - }); - - background: var(--black-250); - border-radius: var(--su8); - bottom: 0; - content: ""; - display: block; - left: 0; - position: absolute; - top: 0; - width: var(--su4); - } + // TODO SHINE complete answers styling + & &--answers { + display: flex; + flex-direction: column; + gap: var(--su16); + padding-top: calc(var(--su8) + var(--su2)); // 10px + } - margin: var(--su16) 1em 0 1em; - padding: 0.5em 0 0.5em calc(1em + var(--su4)); - position: relative; + & &--answer { + &__accepted { + --_ps-answer-icon-fc: var(--green-400); } - &--answer-excerpt { - .v-truncate4; - color: var(--black-500); - margin-bottom: var(--su8); + .s-post-summary--stats-answers--icon { + color: var(--_ps-answer-icon-fc); } - &--content { - > *:not(.s-post-summary--content-menu-button):not(.s-post-summary--meta):not(.s-popover) { - opacity: var(--_ps-o); - } - - flex-grow: 1; - max-width: 100%; - } + border-left: var(--su4) solid var(--black-200); + display: flex; + flex-direction: column; + gap: var(--su6); + padding-left: var(--su8); + } - &--content-excerpt { - &.s-post-summary--content-excerpt { - &__sm { - .v-truncate1; - } + & &--content { + display: flex; + flex-direction: column; + gap: var(--su4); + width: 100%; + } - &__md { - .v-truncate3; - } + & &--content-meta { + align-items: center; + color: var(--black-400); + display: flex; + flex-wrap: wrap; + font-size: var(--fs-caption); + gap: var(--su6); + margin-bottom: var(--su4); + } - &__lg { - .v-truncate4; - } - } + & &--content-type { + &:focus-visible { + .focus-styles(); + } - .break-word; - .v-truncate2; - color: var( --_ps-content-excerpt-fc); - font-family: var(--theme-post-body-font-family, var(--theme-body-font-family)); - margin-top: var(--sun2); - margin-bottom: var(--su8); + &:hover { + --_ps-content-type-bc: var(--black-150); + --_ps-content-type-bg: var(--black-100); + --_ps-content-type-fc: var(--black-600); } - &--content-menu-button { - .svg-icon { - margin: 0 !important; - } + border: var(--su-static1) solid var(--_ps-content-type-bc); + background-color: var(--_ps-content-type-bg); + color: var(--_ps-content-type-fc); - &, - &.s-btn { // To override .s-btn class attributes - padding: var(--su8); - position: absolute; - } + display: flex; + align-items: center; + gap: var(--su4); + padding: 0 var(--su4); + font-size: var(--fs-caption); + } - right: var(--su8); - top: var(--su8); - } + & &--excerpt { + line-height: 1.25rem; // TODO use a standard line-height variable + margin-bottom: 0; + } - &--content-title { - a { - &:active, - &:hover { - color: var(--_ps-content-title-a-fc-hover); - } - &:visited { - &:hover { - color: var(--_ps-content-title-a-fc-hover-visited); - } - - color: var(--_ps-content-title-a-fc-visited); - } - - .break-word; - color: var(--_ps-content-title-a-fc); - font-family: var(--theme-post-title-font-family, var(--theme-body-font-family)); - } + & &--stats { + &.s-post-summary--sm-hide { + .s-post-summary--stats-answers { + background-color: var(--_ps-stats-answers-bg); + color: var(--_ps-stats-answers-fc); + font-weight: var(--_ps-stats-answers-fw); - .iconShield { - color: var(--fc-light); + align-items: center; + display: flex; + gap: var(--su4); + justify-content: center; + padding: var(--su4); } - .svg-icon { - position: relative; - top: var(--sun1); - vertical-align: text-bottom; // Optical alignment + .s-post-summary--stats-bounty { + align-items: center; + background-color: var(--blue-400); + color: var(--white); + display: flex; + gap: var(--su2); + font-weight: 600; + justify-content: center; + padding: var(--su4); } - .break-word; - display: block; - font-size: var(--fs-body3); - font-weight: normal; - line-height: var(--lh-md); - margin-bottom: 0.3365rem; - margin-top: -0.125rem; // Optical alignment to compensate for title's containing block - padding-right: var(--su24); - } - - &--content-type { - .svg-icon { - color: var(--fc-light); - margin-left: var(--sun2); + .s-post-summary--stats-votes { + align-items: center; + aspect-ratio: 1/1; + border: var(--su1) solid var(--black-200); + display: flex; + justify-content: center; + font-size: var(--fs-body2); + font-weight: 600; + margin-bottom: var(--su2); + padding: var(--su4); + width: calc(var(--su48) + var(--su8)); // 3.5rem } - color: var(--fc-medium); - margin-bottom: var(--su4); + flex-direction: column; } - &--meta { - > *:not(.s-post-summary--meta-tags):not(.s-user-card) > * { - opacity: var(--_ps-o); - } - - .s-user-card { - > *:not(.magic-popup) { - opacity: var(--_ps-o); - } - - flex-wrap: wrap; - justify-content: flex-end; - margin-left: auto; + &.s-post-summary--sm-show { + .s-post-summary--stats-answers--icon { + color: var(--_ps-stats-answers-icon-fc); } align-items: center; - column-gap: var(--su6); - display: flex; - flex-wrap: wrap; - justify-content: space-between; - row-gap: var(--su8); + justify-content: center; + padding: var(--su4); } - &--meta-tags { - > ul > li > a, - > a, - .post-tag, - .s-tag { - opacity: var(--_ps-o); - } - + .s-post-summary--stats-bounty { + align-items: center; + justify-content: center; + background-color: var(--blue-400); + color: var(--white); display: flex; - flex-wrap: wrap; - gap: var(--su4); + gap: var(--su1); + padding: 0 calc(var(--su4) - var(--su1)); } - &--stats { - > *:not(.s-badge__danger) { - opacity: var(--_ps-o); - } - - align-items: var(--_ps-stats-ai); - color: var(--_ps-stats-fc); - flex-direction: var(--_ps-stats-fd); - width: var(--_ps-stats-w); + display: flex; + gap: var(--su6); + font-size: var(--fs-caption); + } - display: flex; - flex-shrink: 0; - flex-wrap: wrap; - font-size: var(--fs-body1); - gap: var(--su6); - margin-bottom: var(--su4); - margin-right: var(--su16); + & &--stats-item { + &:before { + aspect-ratio: 1/1; + background-color: var(--black-300); + content: ""; + display: block; + height: var(--su4); } - &--stats-item { - &:not(.s-badge) { - &.is-deleted { - color: var(--white); - } - - align-items: center; - border: var(--su1) solid transparent; - display: inline-flex; - gap: 0.3em; - justify-content: center; - white-space: nowrap; - } - - &.s-badge { - font-size: var(--fs-body1); - line-height: var(--lh-md); - padding: var(--su2) var(--su4); - } - - &.has-answers, - &.has-bounty, // TODO DEPRECATED: Remove .has-bounty styling - &.is-archived, - &.is-closed, - &.is-deleted, - &.is-draft, - &.is-pinned, - &.is-published, - &.is-review { - border-radius: var(--br-md); - padding: var(--su2) var(--su4); - } - - &.has-answers { - &.has-accepted-answer { - background-color: var(--_ps-has-accepted-answers-bg); - border-color: var(--_ps-has-accepted-answers-bc); - color: var(--_ps-has-accepted-answers-fc); - } - - background-color: var(--_ps-has-answers-bg); - border: var(--su1) solid var(--_ps-has-answers-bc); - color: var(--_ps-has-answers-fc); - } - - &.has-bounty { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__bounty` - background-color: var(--blue-500); - color: var(--white); - } - - // Hotness - &.is-warm { - color: var(--_ps-state-fc, var(--yellow-500)); - } - - &.is-hot { - color: var(--_ps-state-fc, var(--orange-500)); - } - - &.is-supernova { - color: var(--_ps-state-fc, var(--red-500)); - } - - // Status - &.is-archived { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__muted s-badge__icon` - background-color: var(--black-225); - border-color: var(--black-500); - color: var(--black-600); - } - - &.is-closed { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__danger s-badge__icon` - background-color: var(--red-300); - border-color: var(--red-500); - color: var(--red-600); - } - - &.is-draft { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__info s-badge__icon` - background-color: var(--blue-300); - border-color: var(--blue-500); - color: var(--blue-600); - } + align-items: center; + display: flex; + gap: var(--su6); + } - &.is-pinned { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__muted s-badge__filled s-badge__icon` - background-color: var(--black-500); - color: var(--white); - } + & &--tags { + display: flex; + flex-wrap: wrap; + gap: var(--su8); + margin-top: var(--su6); + } - &.is-published { - background-color: var(--black-150); - color: var(--black-600); - } + & &--title { + display: flex; + gap: var(--su6); + line-height: 1.25rem; // TODO use a standard line-height variable + } - &.is-review { // TODO DEPRECATED: Remove and replace with references with `s-badge s-badge__warning s-badge__icon` - background-color: var(--yellow-300); - border-color: var(--yellow-500); - color: var(--yellow-600); - } + & &--title-link { + &:hover { + --_ps-title-link-fc: var(--theme-secondary-500); - &__emphasized { - color: var(--_ps-stats-item-emphasized-fc); + &:visited { + color: var(--theme-secondary-600); } } - &--stats-item-number { - font-weight: 500; + // TODO: Since custom property is not being applied for some reason, we're changing the color directly. Remove this once the custom property is fixed. + // I suspect this is because of restrictions on the `:visited` pseudo-class. + // See https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:visited#privacy_restrictions + &:visited { + color: var(--theme-secondary-400); } + color: var(--_ps-title-link-fc); + display: flex; + font-size: var(--fs-body3); + font-weight: 600; + gap: var(--su4); + margin-top: var(--su2); + } + + & &--title-icon { + flex-shrink: 0; } - background-color: var(--_ps-bg); - border-bottom: var(--_ps-bb); + // Container query setup + container-type: inline-size; + container-name: post-summary; + color: var(--black-500); display: flex; - padding: var(--su16); + gap: var(--su16); position: relative; + width: 100%; } diff --git a/packages/stacks-classic/lib/components/post-summary/post-summary.test.setup.ts b/packages/stacks-classic/lib/components/post-summary/post-summary.test.setup.ts index 83e96f5288..7bd2277b2f 100644 --- a/packages/stacks-classic/lib/components/post-summary/post-summary.test.setup.ts +++ b/packages/stacks-classic/lib/components/post-summary/post-summary.test.setup.ts @@ -1,435 +1,335 @@ import { html } from "@open-wc/testing"; import { IconArchiveSm, - IconCheckmarkSm, - IconEllipsisVertical, - IconEyeSm, - IconNotInterested, - IconPencilSm, - IconTackSm, - IconTrashSm, -} from "@stackoverflow/stacks-icons-legacy/icons"; + IconDocumentAlt, + IconShield, +} from "@stackoverflow/stacks-icons-legacy"; import type { TestVariationArgs } from "../../test/test-utils"; import "../../index"; +import { + IconAnswer16, + IconAnswer16Fill, + IconCompose, +} from "@stackoverflow/stacks-icons/icons"; -type BadgeType = - | "danger" - | "danger-filled" - | "info" - | "muted" - | "muted-filled" - | "warning"; +// ISO timestamp used for the user time tooltip (title) +const USER_TIME_ISO = "2026-01-15T12:00:00.000Z"; type Stats = { - votes: number; - views: number; - answers: number; + votes: number | string; + views: number | string; + answers: number | string; accepted?: boolean; - bounty?: number; - badge?: BadgeType; + bounty?: number | string; + badge?: boolean; }; -type Tags = { text: string; type?: "required" | "moderator" }[]; - -type TruncationSizes = "sm" | "md" | "lg" | ""; +type Tags = { + text: string; + type?: "ignored" | "watched"; +}[]; -const formatNumber = (num: number) => { - switch (true) { - case num > 10000090: - return (num / 1000000).toFixed(0) + "m"; - case num > 1000000: - return (num / 1000000).toFixed(1) + "m"; - case num > 10000: - return (num / 1000).toFixed(0) + "k"; - case num > 1000: - return (num / 1000).toFixed(1) + "k"; - default: - return num.toString(); - } +const getBadge = () => { + return `${IconCompose} Draft`; }; -const getBadge = (type: BadgeType) => { - const badgeClasses = type - .split("-") - .map((modifier) => `s-badge__${modifier}`) - .join(" "); - const getIcon = () => { - switch (type) { - case "danger": - return IconNotInterested; - case "danger-filled": - return IconTrashSm; - case "info": - return IconPencilSm; - case "muted": - return IconArchiveSm; - case "muted-filled": - return IconTackSm; - case "warning": - return IconEyeSm; - default: - return ""; +// Stats block for wide containers +const getStatsSmHide = ({ votes, answers, accepted, bounty }: Stats) => ` +- ${text ? text : "In the spirit of type safety associated with the CriteriaQuery JPA 2.0 also has an API to support Metamodel representation of entities. Is anyone aware of a fully functional implementation of this API (to generate the Metamodel as opposed to creating the metamodel classes manually)? It would be awesome if someone also knows the steps for setting this up in Eclipse (I assume it's as simple as setting up an annotation processor, but you never know)."} -
+${excerpt}
++ I wanted to see how different tags related to each other. The below graph depicts associations between popular tags on our site. Description of analysis: I started looking at the 1000 most popular tags on questions in 2021. I created a list of tags cross joined by the question ID (so if a question contains tags for both Python and Numpy, it would show up in my list). I scaled up by the number of answers each question received (noting that some tag combos had 0 answers) -and then counted each distinct combination of each tag. Due to limitations in graphing, I only displayed the top ~2500 tag combinations - which accounts for tags combos that had more than 40 answers over the entire year. +
+ `; + + const contentMetaEl = ` + + `; -const getSizeChildren = (size: string) => { - return getChildren({ - show: { - description: true, - menuBtn: true, - stats: true, - tags: true, - title: true, - user: true, - }, - description: { - truncation: size as TruncationSizes, - }, - }); + return ` + ${statsParam ? getStatsSmHide(stats) : ""} ++ {{ data.excerpt | default: defaultExcerpt }} +
+ {% endif %} + + {% if data.answerCount > 0 %} +Post summaries are a flexible component capable of previewing various content types—questions or articles. Post summaries are meant to be flexible, allowing for each individual piece to be removed. Let’s start with a full example of a few questions and an article interleaved.
- {% header "h3", "Full" %} -At their most complete, post summaries are presented in two columns and can contain:
-At the smallest breakpoint, the layout will switch to a single column.
+{% header "h2", "Examples" %} +{% header "h3", "Base" %} +Use the post summary component to provide a concise summary of a question, article, or other content.
- In the spirit of type safety associated with the CriteriaQuery JPA 2.0 also has an API to support Metamodel representation of entities. -
- - - {% icon "EllipsisVertical" %} - menu - -- I am creating my first react-native app. I am attempting to install the react-native command line interface as shown here. I keep getting an error when I type the command to initiate the react-native command line -
- - - {% icon "EllipsisVertical" %} - menu - -- This article aims to guide you through the steps and processes you may want to consider when running research at Stack Overflow. While there are obviously many methods, this guide will focus more interview-style research. For a full list of Product Research templates, guides, and links, see this article. -
- - - {% icon "EllipsisVertical" %} - menu +