@nuxtseo/pro-indexing 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -150,7 +150,7 @@ The site builds `model` with `buildIndexingOverviewModel(input, diagnose)` from
150
150
 
151
151
  ### Submissions
152
152
 
153
- A Submission is a notification a Site sent to a search engine, through IndexNow or Google's Indexing API. The section answers "what did sending do?" with three rules: an accepted Submission Receipt proves receipt only, "Afterwards" is order in time and never cause, and no string states an indexing timeframe. The shapes live in `shared/submissions.ts` and mirror the gscdump operations `getSiteSubmissionSummary` and `listSiteSubmissionOutcomes`, so a site that reads those maps them as they are.
153
+ A Submission is a notification a Site sent to a search engine, through IndexNow or Google's Indexing API. The section answers "what did sending do?" with three rules: an accepted Submission Receipt proves receipt only, "Afterwards" is order in time and never cause, and no string states an indexing timeframe. The shapes live in `shared/submissions.ts`. Outcomes anchor where gscdump's `listSiteSubmissionOutcomes` anchors them. The summary counts differently from `getSiteSubmissionSummary`: gscdump adds up every receipt, so a URL sent twice counts twice. The section counts each URL once per engine, by its latest Submission Receipt. gscdump's summary cannot say which URLs repeat, so build `IndexingSubmissionSummary` from the receipt lists.
154
154
 
155
155
  ```vue
156
156
  <IndexingSubmissionsCard :site="site">
@@ -166,7 +166,7 @@ A Submission is a notification a Site sent to a search engine, through IndexNow
166
166
 
167
167
  - `IndexingSubmissionSummary` counts distinct URLs per engine. Each URL counts once per engine, by its latest Submission Receipt. List only the engines the site can send to, even with no URL sent; never add an engine at zero.
168
168
  - `completeness: { _tag: 'partial', receipts }` says the source stopped reading Submission Receipts before the window start. The card says how many it counted.
169
- - `IndexingSubmissionOutcomes` joins each sent URL to Google's latest URL Inspection result from a check made after the URL's first Submission in the window. A result checked before it reads `not-inspected`. `checked` below `sent` says the totals cover fewer URLs than the Site sent, for example when the source caps its lookups. The source never starts a URL Inspection for this read.
169
+ - `IndexingSubmissionOutcomes` joins each sent URL to Google's latest URL Inspection result from a check made after the URL's newest Submission in the window that the engine received: IndexNow at HTTP 200 or HTTP 202, or Google accepted. This matches gscdump's `listSiteSubmissionOutcomes`. A result checked before it reads `not-inspected`. A URL that no engine received stays out of the totals. A source may still return its row, anchored on its newest Submission, so the timeline shows the Submission that failed. `checked` below `sent` says the totals cover fewer URLs than the Site sent, for example when the source caps its lookups or no engine received some URLs. The source never starts a URL Inspection for this read.
170
170
  - `automaticSending` is null when the Site has no IndexNow key. `key-unverified` is the switch on while the key file needs verification.
171
171
  - The URLs table calls `submissionOutcomes(site, { url })` when a person opens a URL's detail, and draws the row whose URL matches, ignoring a trailing slash. Return only that URL's row. The card calls it once with `{ limit: 0 }` for the totals.
172
172
  - `IndexingSubmissionsCell` calls `submissionsRollup()` in each row, so the source must return one shared read, keyed once for the scope, such as a query composable that dedupes by key. Leave the capability out rather than reading once per Site.
@@ -164,9 +164,9 @@ const statusSparklineColors: Record<StepStatus, string> = {
164
164
  /* ─── Inline variant ─── */
165
165
  .inline-pipeline {
166
166
  display: flex;
167
+ flex-wrap: wrap;
167
168
  align-items: flex-start;
168
- gap: 0.375rem;
169
- overflow-x: auto;
169
+ gap: 0.25rem 0.375rem;
170
170
  }
171
171
 
172
172
  .inline-step {
@@ -10,7 +10,7 @@ import { VisAxis, VisCrosshair, VisLine, VisStackedBar, VisTooltip, VisXYContain
10
10
  import { useElementSize } from '@vueuse/core'
11
11
  import { computed, useTemplateRef } from 'vue'
12
12
  import { ClientOnly, NuxtLink, UiAlert, UiButton, UiEmptyState, UiFavicon, UiIcon, UiSkeleton, UiTableShell, UiTableTd, UiTableTh, UiTooltip, UiWidgetState } from '#components'
13
- import { summarizeIndexingChanges } from '../../shared/changes'
13
+ import { countAxisTicks, summarizeIndexingChanges } from '../../shared/changes'
14
14
  import { hasCoverageObservation, isEntryPending, portfolioFetchState } from '../../shared/portfolio'
15
15
  import { useIndexingSource } from '../composables/useIndexingSource'
16
16
  import { useProIndexingCopy } from '../composables/useProIndexingCopy'
@@ -80,18 +80,7 @@ const yDomain = computed<[number, number]>(() => [
80
80
  -Math.max(...days.value.map(day => day.dropped), 0),
81
81
  Math.max(...days.value.map(day => day.indexed), 1),
82
82
  ])
83
- // Counts are whole numbers, so the axis never labels a fraction. The step is a
84
- // 1, 2, or 5 multiple of a power of 10, and never below 1.
85
- const yTickValues = computed(() => {
86
- const [min, max] = yDomain.value
87
- const raw = (max - min) / 4
88
- const power = 10 ** Math.floor(Math.log10(raw))
89
- const step = Math.max(1, [1, 2, 5, 10].find(factor => factor * power >= raw)! * power)
90
- const ticks: number[] = []
91
- for (let value = Math.ceil(min / step) * step; value <= max; value += step)
92
- ticks.push(value)
93
- return ticks
94
- })
83
+ const yTickValues = computed(() => countAxisTicks(yDomain.value))
95
84
 
96
85
  const plotEl = useTemplateRef<HTMLElement>('plotEl')
97
86
  const { width: plotWidth } = useElementSize(plotEl)
@@ -9,8 +9,9 @@ import { indexingActionForIssue, parseIndexCohortFilter } from '@gscdump/sdk/ind
9
9
  import { issueDetails, severityOrder } from '@gscdump/sdk/indexing-issues'
10
10
  import { DISPLAY_LOCALE, useProHumanFriendlyNumber } from '@nuxtseo/design-system/app/composables/formatting'
11
11
  import { fillCopy } from '@nuxtseo/pro-shell/shared/copy'
12
+ import { useElementSize } from '@vueuse/core'
12
13
  import { navigateTo, useRoute } from 'nuxt/app'
13
- import { computed, h, onMounted, ref, watch } from 'vue'
14
+ import { computed, h, onMounted, ref, useTemplateRef, watch } from 'vue'
14
15
  import { UiButton, UiChip, UiDataList, UiIcon, UiMetricLabel as UiMetricLabelCell, UiPopover, UiSeverityDot, UiSkeleton, UiSyncDot } from '#components'
15
16
  import { useToast } from '#imports'
16
17
  import { issueIcons } from '../../shared/issue-display'
@@ -42,6 +43,9 @@ const { site, pageSize = 25, shell, forceSkeleton = false } = defineProps<{
42
43
  }>()
43
44
 
44
45
  const source = useIndexingSource()
46
+ // The table scrolls sideways on a phone, and an expanded row spans the whole
47
+ // table. Its detail is held to this visible width so nothing is cut off.
48
+ const { width: visibleWidth } = useElementSize(useTemplateRef<HTMLElement>('root'))
45
49
  const hasSubmissionOutcomes = !!source?.submissionOutcomes
46
50
  const copy = useProIndexingCopy().urls
47
51
  const siteRef = () => site ?? null
@@ -642,7 +646,12 @@ function indexingUrlId(row: GscdumpIndexingUrl): string {
642
646
  </script>
643
647
 
644
648
  <template>
645
- <div class="space-y-3" data-pro-indexing-section="urls">
649
+ <div
650
+ ref="root"
651
+ class="space-y-3"
652
+ data-pro-indexing-section="urls"
653
+ :style="visibleWidth ? { '--idx-visible-width': `${visibleWidth}px` } : undefined"
654
+ >
646
655
  <!-- Facet panel: consolidation targets (canonical_mismatch) -->
647
656
  <UiDataList
648
657
  v-if="facet === 'canonical_mismatch'"
@@ -1033,6 +1042,11 @@ function indexingUrlId(row: GscdumpIndexingUrl): string {
1033
1042
  }
1034
1043
 
1035
1044
  .idx-expanded {
1045
+ /* Stays in view while the table scrolls sideways: the visible width less the
1046
+ row inset on each side and the table border. */
1047
+ position: sticky;
1048
+ left: 0.5rem;
1049
+ max-width: calc(var(--idx-visible-width, 100%) - 1rem - 2px);
1036
1050
  padding: 1rem 1.25rem;
1037
1051
  border-radius: 0.5rem;
1038
1052
  background: color-mix(in srgb, var(--ui-bg-elevated) 20%, transparent);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nuxtseo/pro-indexing",
3
3
  "type": "module",
4
- "version": "0.1.8",
4
+ "version": "0.1.9",
5
5
  "description": "Nuxt SEO Pro indexing layer: the dashboard indexing sections (Portfolio overview, issues and changes, the per-Site diagnosis panel, coverage trend, Index cohorts, and the indexing URLs table) over one IndexingSource adapter and a route map. Extends @nuxtseo/pro-shell.",
6
6
  "license": "MIT",
7
7
  "homepage": "https://nuxtseo.com",
@@ -37,8 +37,8 @@
37
37
  "@gscdump/contracts": "^7.13.0",
38
38
  "@gscdump/sdk": "^7.13.0",
39
39
  "@nuxt/ui": "^4.11.1",
40
- "@nuxtseo/design-system": "^0.1.8",
41
- "@nuxtseo/pro-shell": "^0.1.8",
40
+ "@nuxtseo/design-system": "^0.1.9",
41
+ "@nuxtseo/pro-shell": "^0.1.9",
42
42
  "@vueuse/core": "^14.0.0 || ^15.0.0",
43
43
  "nuxt": "^4.6.0",
44
44
  "typescript": ">=5.8.0 <7",
@@ -49,11 +49,11 @@
49
49
  "@unovis/vue": "^1.6.7"
50
50
  },
51
51
  "devDependencies": {
52
- "@gscdump/contracts": "7.13.0",
53
- "@gscdump/sdk": "7.13.0",
52
+ "@gscdump/contracts": "7.17.0",
53
+ "@gscdump/sdk": "7.17.0",
54
54
  "@nuxt/ui": "^4.11.1",
55
- "@nuxtseo/design-system": "0.1.8",
56
- "@nuxtseo/pro-shell": "0.1.8",
55
+ "@nuxtseo/design-system": "0.1.9",
56
+ "@nuxtseo/pro-shell": "0.1.9",
57
57
  "@vueuse/core": "^14.4.0",
58
58
  "nuxt": "4.6.1",
59
59
  "site-typecheck": "0.0.0",
package/shared/changes.ts CHANGED
@@ -73,6 +73,22 @@ function windowAxis(through: string, windowDays: number): string[] {
73
73
  new Date(last - (windowDays - 1 - index) * DAY_MS).toISOString().slice(0, 10))
74
74
  }
75
75
 
76
+ /**
77
+ * Y axis ticks for a count chart over `[min, max]`. Counts are whole numbers,
78
+ * so the axis never labels a fraction: the step is a 1, 2, or 5 multiple of a
79
+ * power of 10, and never below 1.
80
+ */
81
+ export function countAxisTicks([min, max]: readonly [number, number]): number[] {
82
+ const raw = (max - min) / 4
83
+ const power = 10 ** Math.floor(Math.log10(raw))
84
+ const step = Math.max(1, [1, 2, 5, 10].find(factor => factor * power >= raw)! * power)
85
+ const ticks: number[] = []
86
+ // `Math.ceil(-0.5)` is `-0`, which a formatter prints as "-0": `|| 0` makes it 0.
87
+ for (let value = Math.ceil(min / step) * step; value <= max; value += step)
88
+ ticks.push(value || 0)
89
+ return ticks
90
+ }
91
+
76
92
  /** The indexed change across the window, or null without two days to compare. */
77
93
  export function indexingLevelChange(trend: readonly IndexingTrendReading[], from: string): IndexingLevelChange | null {
78
94
  const points = trend.filter(point => point.totalUrls > 0 && point.date >= from).toSorted((a, b) => a.date.localeCompare(b.date))
package/shared/copy.ts CHANGED
@@ -140,10 +140,10 @@ const DEFAULTS = {
140
140
  emptyTitle: 'Tell search engines when URLs change',
141
141
  emptyBody: 'No URLs sent in the last {days} days.',
142
142
  afterwardsTitle: 'Afterwards in Google',
143
- afterwardsTooltip: 'Google\'s latest URL Inspection result for each URL sent, from a check made after it was sent. Not inspected yet means no check since then. It shows what happened next. It does not show that sending caused it.',
143
+ afterwardsTooltip: 'Google\'s latest URL Inspection result for each URL that a search engine received. Only a check made after the engine last received the URL counts. Not inspected yet means no check since then. It shows what happened next. It does not show that sending caused it. Google does not support IndexNow.',
144
144
  afterwardsScope: 'Of {count} URLs sent',
145
145
  afterwardsScopeOne: 'Of 1 URL sent',
146
- afterwardsPartial: 'Google results cover {checked} of the {count} URLs sent.',
146
+ afterwardsPartial: 'These counts cover {checked} of the {count} URLs sent.',
147
147
  indexed: 'Indexed',
148
148
  notIndexed: 'Not indexed',
149
149
  notInspected: 'Not inspected yet',
@@ -1,9 +1,12 @@
1
1
  // Submissions: the notifications a Site sent to a search engine, and what
2
2
  // Google reported afterwards. The `submissions`, `submissionOutcomes` and
3
- // `submissionsRollup` Indexing capabilities return these shapes. They mirror
4
- // the gscdump operations `getSiteSubmissionSummary` and
5
- // `listSiteSubmissionOutcomes`, so a site that reads those maps them as they
6
- // are. A site that cannot read them yet builds them from its receipt lists.
3
+ // `submissionsRollup` Indexing capabilities return these shapes. Outcomes
4
+ // anchor where gscdump's `listSiteSubmissionOutcomes` anchors them. The
5
+ // summary counts differently from `getSiteSubmissionSummary`: gscdump adds up
6
+ // every receipt, so a URL sent twice counts twice. Here each URL counts once
7
+ // per engine, by its latest Submission Receipt. gscdump's summary cannot say
8
+ // which URLs repeat, so a site builds `IndexingSubmissionSummary` from its
9
+ // receipt lists.
7
10
  //
8
11
  // Rules every section keeps:
9
12
  // - An accepted receipt proves the engine received the URL. Nothing more.
@@ -97,8 +100,12 @@ export interface IndexingSubmissionSend {
97
100
 
98
101
  /**
99
102
  * Google's latest URL Inspection result for a sent URL, from a check made
100
- * after the URL's first Submission in the window. A result checked before
101
- * that Submission does not count: the URL reads `not-inspected`.
103
+ * after the URL's newest Submission in the window that the engine received:
104
+ * IndexNow at HTTP 200 or HTTP 202, or Google accepted. gscdump anchors its
105
+ * outcomes the same way. A result checked before that Submission does not
106
+ * count: the URL reads `not-inspected`. A URL that no engine received stays
107
+ * out of the totals. A source may still return its row, anchored on its newest
108
+ * Submission, so the timeline shows the Submission that failed.
102
109
  */
103
110
  export type IndexingGoogleAfterwards
104
111
  = | { readonly _tag: 'not-inspected' }
@@ -136,7 +143,8 @@ export interface IndexingSubmissionOutcomes {
136
143
  readonly sent: number
137
144
  /**
138
145
  * The URLs the totals cover: `indexed + notIndexed + notInspected`. Below
139
- * `sent` when the source could not check every sent URL.
146
+ * `sent` when the source could not check every sent URL, or when no engine
147
+ * received some of them.
140
148
  */
141
149
  readonly checked: number
142
150
  readonly indexed: number