@eeacms/volto-cca-policy 1.0.2 → 1.0.4

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.
Files changed (78) hide show
  1. package/CHANGELOG.md +259 -3
  2. package/jest-addon.config.js +4 -2
  3. package/locales/bg/LC_MESSAGES/volto.po +576 -0
  4. package/locales/cs/LC_MESSAGES/volto.po +576 -0
  5. package/locales/da/LC_MESSAGES/volto.po +576 -0
  6. package/locales/de/LC_MESSAGES/volto.po +576 -0
  7. package/locales/el/LC_MESSAGES/volto.po +576 -0
  8. package/locales/en/LC_MESSAGES/volto.po +576 -0
  9. package/locales/es/LC_MESSAGES/volto.po +576 -0
  10. package/locales/et/LC_MESSAGES/volto.po +576 -0
  11. package/locales/fi/LC_MESSAGES/volto.po +576 -0
  12. package/locales/fr/LC_MESSAGES/volto.po +576 -0
  13. package/locales/ga/LC_MESSAGES/volto.po +576 -0
  14. package/locales/hr/LC_MESSAGES/volto.po +576 -0
  15. package/locales/hu/LC_MESSAGES/volto.po +576 -0
  16. package/locales/is/LC_MESSAGES/volto.po +576 -0
  17. package/locales/it/LC_MESSAGES/volto.po +576 -0
  18. package/locales/lt/LC_MESSAGES/volto.po +576 -0
  19. package/locales/lv/LC_MESSAGES/volto.po +576 -0
  20. package/locales/mt/LC_MESSAGES/volto.po +576 -0
  21. package/locales/nl/LC_MESSAGES/volto.po +576 -0
  22. package/locales/nn/LC_MESSAGES/volto.po +576 -0
  23. package/locales/pl/LC_MESSAGES/volto.po +576 -0
  24. package/locales/pt/LC_MESSAGES/volto.po +576 -0
  25. package/locales/ro/LC_MESSAGES/volto.po +576 -0
  26. package/locales/sk/LC_MESSAGES/volto.po +576 -0
  27. package/locales/sl/LC_MESSAGES/volto.po +576 -0
  28. package/locales/sv/LC_MESSAGES/volto.po +576 -0
  29. package/locales/tr/LC_MESSAGES/volto.po +576 -0
  30. package/locales/volto.pot +577 -1
  31. package/package.json +1 -1
  32. package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueCardItem.jsx +224 -0
  33. package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueCardItem.test.jsx +173 -0
  34. package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueContentView.jsx +189 -0
  35. package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapView.jsx +272 -0
  36. package/src/components/Search/NavigatorCatalogue/NavigatorCatalogueMapView.test.jsx +160 -0
  37. package/src/components/Search/NavigatorCatalogue/utils.js +157 -0
  38. package/src/components/Search/NavigatorCatalogue/utils.test.js +132 -0
  39. package/src/components/Search/NavigatorGuide/NavigatorGuideContentView.jsx +409 -0
  40. package/src/components/Search/NavigatorGuide/NavigatorGuideLayout.jsx +8 -0
  41. package/src/components/index.js +2 -0
  42. package/src/components/theme/CompareTools/CompareToolsPanel.jsx +151 -0
  43. package/src/components/theme/CompareTools/CompareToolsPanel.test.jsx +96 -0
  44. package/src/components/theme/CompareTools/CompareToolsView.jsx +475 -0
  45. package/src/components/theme/CompareTools/CompareToolsView.test.jsx +110 -0
  46. package/src/components/theme/CompareTools/utils.js +111 -0
  47. package/src/components/theme/CompareTools/utils.test.jsx +217 -0
  48. package/src/components/theme/Views/ExtendedToolView.jsx +201 -201
  49. package/src/components/theme/Views/ExtendedToolView.test.jsx +420 -58
  50. package/src/constants.js +0 -48
  51. package/src/customizations/volto/reducers/breadcrumbs/breadcrumbs.js +1 -1
  52. package/src/helpers/Utils.jsx +29 -0
  53. package/src/helpers/index.js +3 -0
  54. package/src/index.js +28 -2
  55. package/src/search/index.js +6 -0
  56. package/src/search/navigator_catalogue/config.js +89 -0
  57. package/src/search/navigator_catalogue/facets.js +86 -0
  58. package/src/search/navigator_catalogue/views.js +28 -0
  59. package/src/search/navigator_guide/config.js +70 -0
  60. package/src/search/navigator_guide/facets.js +31 -0
  61. package/src/search/navigator_guide/guideSteps.js +93 -0
  62. package/src/slate-styles.less +4 -0
  63. package/src/state.js +1 -0
  64. package/theme/elements/button.overrides +0 -11
  65. package/theme/elements/label.overrides +15 -0
  66. package/theme/globals/blocks.less +3 -2
  67. package/theme/globals/navigator.less +1090 -0
  68. package/theme/globals/site.overrides +5 -0
  69. package/theme/tokens/colors.less +2 -0
  70. package/artifacts/BLOCKS.md +0 -167
  71. package/artifacts/link-integrity-workflow/README.md +0 -76
  72. package/artifacts/link-integrity-workflow/index.md +0 -33
  73. package/artifacts/link-integrity-workflow/link-integrity-block-fields-report.md +0 -132
  74. package/artifacts/link-integrity-workflow/link-integrity-blocks-report.md +0 -52
  75. package/artifacts/link-integrity-workflow/understanding-link-integrity.md +0 -143
  76. package/artifacts/link-integrity-workflow/volto-block-link-analysis.md +0 -63
  77. package/artifacts/link-integrity-workflow/volto-block-link-discovery.md +0 -60
  78. package/artifacts/test-fixes/test-fixes-specification.md +0 -267
@@ -5,6 +5,7 @@
5
5
  @import './observatory.less';
6
6
  @import './views.less';
7
7
  @import './search.less';
8
+ @import './navigator.less';
8
9
  @import './blocks.less';
9
10
  @import './print.less';
10
11
 
@@ -111,6 +112,10 @@ p.has--clear--both:empty {
111
112
 
112
113
  // General styles
113
114
 
115
+ small {
116
+ font-size: 80%;
117
+ }
118
+
114
119
  .listing-body-dates:empty {
115
120
  margin-bottom: 0;
116
121
  }
@@ -4,6 +4,8 @@
4
4
  @lightGrey: #e6e7e8;
5
5
  @midWhite: #f9f9f9;
6
6
 
7
+ @green: #289588;
8
+
7
9
  // MKH
8
10
  @green-1: #118833;
9
11
  @green-2: #007722;
@@ -1,167 +0,0 @@
1
- # Custom Blocks in `volto-cca-policy`
2
-
3
- This addon registers **20 custom blocks** and extends **2 existing blocks** (Listing, Tabs Block) with new variations.
4
- All blocks are installed via `src/components/manage/Blocks/index.js`.
5
-
6
- ---
7
-
8
- ## Custom Blocks
9
-
10
- ### AST Navigation
11
- - **Block ID:** `astNavigation`
12
- - **Group:** `site`
13
- - **Restricted to:** Mission pages (via `blockAvailableInMission`)
14
- - **What it does:** Renders a visual navigation map (logo map) for the *Adaptation Support Tool (AST)*. Supports two image types (`ast` and `uast`). Editors configure 6 linked items that map to clickable regions on the logo image. Clicking a region navigates to the corresponding content page.
15
-
16
- ### C3S Indicators Glossary
17
- - **Block ID:** `c3SIndicatorsGlossaryBlock`
18
- - **Group:** `site`
19
- - **Restricted to:** Mission pages
20
- - **What it does:** Displays a glossary table of C3S (Copernicus Climate Change Service) indicator terms. The content is provided by a server-side `@components` view (`c3s_indicators_glossary_table`) and rendered as raw HTML.
21
-
22
- ### C3S Indicators Listing
23
- - **Block ID:** `c3SIndicatorListingBlock`
24
- - **Group:** `site`
25
- - **Restricted to:** Mission pages
26
- - **What it does:** Renders a description and a linked list of C3S indicators. Content (description text + item list with URLs) is provided by the server-side `@components` view `c3s_indicators_listing`.
27
-
28
- ### C3S Indicators Overview
29
- - **Block ID:** `c3SIndicatorsOverviewBlock`
30
- - **Group:** `site`
31
- - **Restricted to:** Mission pages
32
- - **What it does:** Displays an HTML description/overview of C3S indicators, fetched from the server-side `@components` view `c3s_indicators_overview`.
33
-
34
- ### Case Study Explorer
35
- - **Block ID:** `caseStudyExplorer`
36
- - **Group:** `site`
37
- - **Restricted to:** Mission pages
38
- - **What it does:** An interactive map-based explorer for climate adaptation case studies. Loads case study data from an ArcGIS JSON endpoint (`@@case-studies-map.arcgis.json`). Provides filter controls (sectors, impacts, etc.) and an interactive map with clickable features. Supports URL-based filter parameters.
39
-
40
- ### Collection Statistics
41
- - **Block ID:** `collectionStats`
42
- - **Group:** `site`
43
- - **What it does:** Displays aggregated statistics for a content collection. Shows two groups of stats with icons and counts:
44
- - **Health impacts:** Climate-sensitive diseases, Heat, Wildfires, Droughts and floods, Air pollution and aero-allergens
45
- - **Content types:** Adaptation options, Case studies, Guidance, Indicators, Information portals, Organisations, Publications, Research projects, Tools, Videos
46
- - Stats are computed from query stats via `getQueryStats` and can link to filtered search results.
47
-
48
- ### Content Links
49
- - **Block ID:** `contentLinks`
50
- - **Group:** `site`
51
- - **Variations:**
52
- - `default` — Simple list of linked content items
53
- - `navigationList` — Navigation-style list with active-state highlighting based on current URL
54
- - `dropdown` — Dropdown selector for linking to content items (with configurable placeholder text)
55
- - **What it does:** Displays a set of manually selected content items as links. Useful for sidebars, navigation menus, or quick-access link groups.
56
-
57
- ### Country Map Heat Index
58
- - **Block ID:** `countryMapHeatIndex`
59
- - **Group:** `site`
60
- - **Restricted to:** Mission pages
61
- - **What it does:** An interactive OpenLayers map of European countries colored by heat index data. Fetches metadata from `@@countries-heat-index-json`. Countries are highlighted with tooltips and are clickable, navigating to the respective country page. Includes a filter control and supports lazy loading via visibility sensor.
62
-
63
- ### Country Map Observatory
64
- - **Block ID:** `countryMapObservatory`
65
- - **Group:** `site`
66
- - **Restricted to:** Mission pages
67
- - **What it does:** An interactive OpenLayers map for the Health Observatory section. Renders EU countries with metadata from `@@countries-metadata-extract-2025`. Supports thematic map modes (e.g., "National adaptation policy"), tooltips, and click-to-navigate interactions. Uses WMS tile sources and lazy loading.
68
-
69
- ### Country Map Profile
70
- - **Block ID:** `countryMapProfile`
71
- - **Group:** `site`
72
- - **Restricted to:** Mission pages
73
- - **What it does:** An interactive OpenLayers map for country profiles. Renders EU countries with metadata from `@@countries-metadata-extract-2025` (including flag images). Supports thematic map modes, tooltips, click-to-navigate, and a filter control. Uses WMS tile sources and lazy loading.
74
-
75
- ### Country Profile Detail
76
- - **Block ID:** `countryProfileDetail`
77
- - **Group:** `site`
78
- - **What it does:** Renders the detailed country profile content provided by a server-side `@components` view (`countryprofile.html`). Displays tabbed sections with accordions, including a language disclaimer for non-English content and optional top messages/accordions.
79
-
80
- ### Data Connected Embed Block
81
- - **Block ID:** `data_connected_embed` (extends `@eeacms/volto-datablocks`)
82
- - **What it does:** Customizes the data-connected embed block from `volto-datablocks` to inject the current page language (`lang`) as an additional query parameter. This ensures embedded data visualizations respect the page's language context. Wraps the base `ViewEmbedBlock` with Redux connectivity and `injectIntl`.
83
-
84
- ### ECDE Indicators
85
- - **Block ID:** `ecdeIndicators`
86
- - **Group:** `site`
87
- - **Restricted to:** Mission pages
88
- - **What it does:** Embeds European Climate Data Explorer (ECDE) indicator visualizations from the Copernicus Climate Data Store (CDS). Loads region data from an EEA ArcGIS service and renders interactive CDS toolbox apps (e.g., growing degree days, mean temperature) for selected European NUTS regions.
89
-
90
- ### Filter AceContent
91
- - **Block ID:** `filterAceContent`
92
- - **Group:** `site`
93
- - **Restricted to:** Mission pages
94
- - **Variations:**
95
- - `simpleListing` — Listing view (default)
96
- - `simpleCards` — Card grid view
97
- - **What it does:** Provides a faceted search/filter interface for ACE (Adaptation Content Exchange) content. Supports filtering by bio-regions, countries, climate impacts, sectors, element types, funding programmes, macro-regions, key types, and free-text search. Uses a custom select widget with styled dropdowns.
98
-
99
- ### Flourish Visualization
100
- - **Block ID:** `FlourishEmbedBlock`
101
- - **Group:** `site`
102
- - **What it does:** Embeds interactive data visualizations from [Flourish.studio](https://flourish.studio). Editors paste a Flourish embed code, and the block extracts the visualization URL, wraps it in an iframe with privacy protection (lazy loading via consent gate), and displays it at a fixed height of 980px.
103
-
104
- ### RAST (Related And Sub-Tree) Block
105
- - **Block ID:** `rastBlock`
106
- - **Group:** `site`
107
- - **Restricted to:** Mission pages
108
- - **What it does:** Renders a contextual navigation block showing related content and sub-items from a configurable root path. Supports skipping specific items and optionally showing subfolders. Uses `ContextNavigation` and `RASTAccordion` components to display a hierarchical accordion-style navigation tree.
109
-
110
- ### Read More
111
- - **Block ID:** `readMoreBlock`
112
- - **Group:** `site`
113
- - **What it does:** Creates a collapsible "read more" section. Wraps all preceding sibling blocks in a height-constrained container with an expand/collapse button. Configurable properties include open/closed labels, button position, and initial height.
114
-
115
- ### Redirection Block
116
- - **Block ID:** `redirectBlock`
117
- - **Group:** `site`
118
- - **What it does:** Automatically redirects anonymous users to a configured target URL. Logged-in users (editors) see a discreet notice showing the redirect target instead of being redirected, so they can still edit the page.
119
-
120
- ### Relevant AceContent
121
- - **Block ID:** `relevantAceContent`
122
- - **Group:** `site`
123
- - **Restricted to:** Mission pages
124
- - **What it does:** Displays a list of relevant ACE (Adaptation Content Exchange) items. Supports two modes: manually selected items and dynamically searched results (by element type, sector, search type, special tags, or search text). Can combine both modes. Renders as a simple linked list.
125
-
126
- ### Search AceContent
127
- - **Block ID:** `searchAceContent`
128
- - **Group:** `site`
129
- - **Restricted to:** Mission pages
130
- - **What it does:** Displays search results from the ACE content search API. Shows results as a linked list with translated labels and counts. Includes a "Share your information" button linking to the share page.
131
-
132
- ### Tabs Block — Spotlight Variation
133
- - **Block ID:** `tabs_block` (extends `@eeacms/volto-tabs-block`)
134
- - **Variation added:** `spotlight`
135
- - **What it does:** Adds a "Spotlight" variation to the standard tabs block. Renders tab content with a spotlight-style layout featuring configurable icons or images (with position and size options), simple markdown support, and scroll-to-target behavior.
136
-
137
- ### Trans Region Select
138
- - **Block ID:** `transRegionSelect`
139
- - **Group:** `site`
140
- - **Restricted to:** Mission pages
141
- - **What it does:** Renders a dropdown selector for transnational regions. Fetches region data from the content's `@components` view (`transnationalregion`) and provides a dropdown with links to each region's page, plus a default "Other regions" option.
142
-
143
- ---
144
-
145
- ## Extended Standard Blocks
146
-
147
- ### Listing (standard Volto block — extended)
148
- The standard Volto `listing` block is extended with **6 new variations**:
149
-
150
- | Variation | Description |
151
- |-----------|-------------|
152
- | `dropdown` | Renders listed items as a dropdown selector with a configurable placeholder text |
153
- | `organisationCards` | Displays items as a 4-column card grid with logo/image and description (for organisations) |
154
- | `indicatorCards` | Displays C3S/Lancet Countdown indicators as styled cards with title and description |
155
- | `eventCards` | Displays events as cards with date info, contact details, event URL, and EEA branding |
156
- | `eventAccordion` | Displays events in an accordion layout with formatted date ranges and "read more" expand |
157
- | `simpleListing` | Plain text list of linked items (minimal styling) |
158
- | `simpleCards` | Generic 4-column card grid with image/logo and title |
159
-
160
- Additionally, the listing block's `noResultsComponent` is overridden to render nothing (instead of showing "No results" text).
161
-
162
- ---
163
-
164
- ## Shared Utilities
165
-
166
- - **`withResponsiveContainer.js`** — HOC that wraps map blocks in a responsive container (used by Country Map blocks)
167
- - **`withVisibilitySensor.jsx`** — HOC that defers map initialization until the block is visible in the viewport (lazy loading)
@@ -1,76 +0,0 @@
1
- # Link Integrity Workflow warning Specification
2
-
3
- ## Overview
4
-
5
- To prevent breaking the browsing experience of public (anonymous) website visitors, Climate-ADAPT intercepts workflow transitions that limit content visibility (such as changing a state to **Private**, **Reject**, or **Retract**).
6
-
7
- Before finalizing these transitions, the system performs an asynchronous backend check using the Plone link integrity relation catalog (`@linkintegrity`) to discover if any other published pages link to the target item. If referencing items are found, the user is presented with a warning modal detailing the pages that link to the item, allowing them to either cancel or proceed anyway.
8
-
9
- ---
10
-
11
- ## Architectural Workflow
12
-
13
- ```mermaid
14
- sequenceDiagram
15
- autonumber
16
- actor Editor
17
- participant WorkflowDropdown as Workflow Dropdown (Workflow.jsx)
18
- participant API as Plone REST API (/@linkintegrity)
19
- participant WarningModal as Warning Modal (WorkflowLinkIntegrityModal.jsx)
20
-
21
- Editor->>WorkflowDropdown: Select "Make Private" / "Reject" / "Retract"
22
- WorkflowDropdown->>API: Dispatch linkIntegrityCheck([UID])
23
- WorkflowDropdown->>WarningModal: Open Warning Modal (with Loader active)
24
- Note over WarningModal: Action buttons are disabled during check
25
-
26
- alt No breaches exist
27
- API-->>WorkflowDropdown: Return 0 breaches
28
- WorkflowDropdown->>WorkflowDropdown: Auto-execute workflow transition
29
- WorkflowDropdown->>WarningModal: Close Modal automatically
30
- WorkflowDropdown-->>Editor: Show success toast
31
- else Breaches exist
32
- API-->>WorkflowDropdown: Return breach details
33
- WorkflowDropdown->>WarningModal: Deactivate Loader & enable confirm
34
- WarningModal-->>Editor: Render list of linking pages & warning copy
35
-
36
- alt Editor clicks "Cancel"
37
- Editor->>WarningModal: Click "Cancel"
38
- WarningModal->>WorkflowDropdown: Reset pending transition & close modal
39
- else Editor clicks "Change state anyway"
40
- Editor->>WarningModal: Click "Change state anyway"
41
- WarningModal->>WorkflowDropdown: Trigger onOk() -> executeTransition()
42
- WorkflowDropdown->>WorkflowDropdown: Execute workflow transition
43
- WorkflowDropdown->>WarningModal: Close Modal
44
- WorkflowDropdown-->>Editor: Show success toast
45
- end
46
- end
47
- ```
48
-
49
- ---
50
-
51
- ## Implementation Details
52
-
53
- ### 1. Workflow Interception (Customization)
54
- * **Path**: [Workflow.jsx](file:///home/tibi/work/eea.docker.plone-climateadapt/cca/frontend/src/addons/volto-cca-policy/src/customizations/volto/components/manage/Workflow/Workflow.jsx)
55
- * **Role**: Shadows Volto core's workflow select component. Intercepts transitions containing state keys (`private`, `reject`, `retract`) or URL suffixes (`/reject`, `/retract`). Dispatches `linkIntegrityCheck` and manages `pendingOption` state. Executes transition automatically if 0 breaches are found.
56
-
57
- ### 2. Warning Modal Component
58
- * **Path**: [WorkflowLinkIntegrityModal.jsx](file:///home/tibi/work/eea.docker.plone-climateadapt/cca/frontend/src/addons/volto-cca-policy/src/components/manage/Workflow/WorkflowLinkIntegrityModal.jsx)
59
- * **Role**: A plain HTML overlay dialog rendered via `ReactDOM.createPortal` into a `<div>` appended to `document.body`. Zero `semantic-ui-react` dependencies — no `Confirm`, `Modal`, or `Portal`.
60
- * **Why not `semantic-ui-react`?** The `Confirm` and `Modal` components use internal Portals, auto-controlled state, and shorthand factory systems that made click handlers unreliable in the toolbar dropdown context. The Toolbar's global `document mousedown` handler (`handleClickOutside`) would intercept clicks, close the menu, and unmount the modal before `onConfirm` could fire.
61
- * **Key implementation details**:
62
- * **Portal rendering** — renders at `document.body` level with `z-index: 10000`, placing it outside the toolbar dropdown's DOM subtree and CSS stacking context so it appears as a proper full-page overlay.
63
- * **Capture-phase `mousedown` guard** — a `capture=true` listener on the portal root calls `e.stopPropagation()`, preventing the Toolbar's `handleClickOutside` from firing while the modal is open.
64
- * **Synchronous breach derivation** — `computeBreaches()` computes `brokenReferences` and `breaches` during render (no `useEffect` + `useState`), so the data is always in sync with `loading` in the same render cycle. This prevents a race condition where `loading` becomes `false` but `brokenReferences` is still `0`, causing premature modal closure.
65
- * **Inline styles** — all CSS is embedded via a `<style>` tag, no external stylesheet dependency.
66
- * **Key UX Features**:
67
- * Maintains button state `disabled: loading` during ongoing checks to prevent premature actions.
68
- * Renders a CSS spinner and loading text during the check.
69
- * Displays the exact list of referencing (source) items and target sub-items.
70
- * Displays the warning copy:
71
- > *"By changing the state, we're not breaking references, but may break user experience for final Anonymous users. There are {brokenReferences} {variation} to this item:"*
72
- * Closes on backdrop click, button click, or `Escape` key.
73
-
74
- ### 3. Unit Verification Suite
75
- * **Path**: [WorkflowLinkIntegrityModal.test.jsx](file:///home/tibi/work/eea.docker.plone-climateadapt/cca/frontend/src/addons/volto-cca-policy/src/components/manage/Workflow/WorkflowLinkIntegrityModal.test.jsx)
76
- * **Role**: Houses Jest/React Testing Library assertions verifying loading indicator visibility, auto-proceed behavior with 0 breaches, warnings list aggregation for multiple breaches, and confirm button presence.
@@ -1,33 +0,0 @@
1
- # Link Integrity & Workflow Documentation Index
2
-
3
- This directory houses the research, analysis, and specifications for Plone/Volto Link Integrity tracking and the "Warn Before Private" workflow state transition verification feature.
4
-
5
- Below is an overview of the role and purpose of each document in this directory:
6
-
7
- ---
8
-
9
- ## 📖 Document Catalog
10
-
11
- ### 1. [README.md](./README.md)
12
- * **Role**: **Feature Specification & Technical Implementation Guide**
13
- * **Description**: High-level specification outlining the "Warn before private" workflow transition warning system. It explains how workflow transitions to private or retracted states are intercepted to check for breaches, contains a Mermaid sequence diagram of the operational flow, and details pointers to the exact implementation files (`Workflow.jsx`, `WorkflowLinkIntegrityModal.jsx`, and the unit test suite).
14
-
15
- ### 2. [understanding-link-integrity.md](./understanding-link-integrity.md)
16
- * **Role**: **Initial Research & Mechanics Overview**
17
- * **Description**: Explains the underlying mechanics of Plone's `plone.app.linkintegrity` package, the `@linkintegrity` and `@relations` REST API endpoints, how internal references are stored in the `zc.relation` catalog using `isReferencing`, and proposes the initial architectural solution for shadowing the Volto toolbar component.
18
-
19
- ### 3. [volto-block-link-discovery.md](./volto-block-link-discovery.md)
20
- * **Role**: **Block Parser Link Extraction Specs**
21
- * **Description**: Detailed specifications on how the Plone backend's block-to-HTML parser (via `plone.volto`) parses internal links and retrieves referencing UIDs from complex Volto blocks (e.g. Columns, Teasers, Maps) to keep the relation catalog accurately indexed.
22
-
23
- ### 4. [volto-block-link-analysis.md](./volto-block-link-analysis.md)
24
- * **Role**: **Technical Analysis of Internal Linking**
25
- * **Description**: Analyzes how internal links are serialized, stored, and resolved within customized layouts. Explains matching strategies for Dexterity schemas and Choice relation fields.
26
-
27
- ### 5. [link-integrity-blocks-report.md](./link-integrity-blocks-report.md)
28
- * **Role**: **Volto Blocks Reference Index**
29
- * **Description**: A quick-reference status report listing the Volto blocks whose internal link fields are covered by link integrity tracking and validation rules.
30
-
31
- ### 6. [link-integrity-block-fields-report.md](./link-integrity-block-fields-report.md)
32
- * **Role**: **Field Mapping Specification**
33
- * **Description**: A comprehensive deep-dive report mapping exactly which fields and properties within the custom blocks schemas are indexed and tracked by the link integrity processor.
@@ -1,132 +0,0 @@
1
- # Link Integrity — Block Field Coverage Report
2
-
3
- **Date:** 2026-05-18
4
- **Scope:** All blocks registered by `volto-cca-policy`, analyzed against the link integrity retrievers available in `plone.restapi` and `eea.climateadapt`.
5
-
6
- ---
7
-
8
- ## Retrievers in Play
9
-
10
- Three retrievers scan block data when content is saved:
11
-
12
- | Retriever | Source | Order | Fields Scanned | Scope |
13
- |---|---|---|---|---|
14
- | `GenericBlockLinksRetriever` | `plone.restapi` | 1 | `url`, `href`, `preview_image` (top-level only) | All blocks (`block_type = None`) |
15
- | `TextBlockLinksRetriever` | `plone.restapi` | 100 | DraftJS `entityMap` LINK entities (`href`, `url`) | `block_type = "text"` |
16
- | `SlateBlockLinksRetriever` | `plone.restapi` | 100 | Slate nodes: `handle_a` → `data.link.internal.internal_link[0]["@id"]`, `handle_link` → `data.url` | `block_type = "slate"` |
17
- | `CCAObjectListLinksRetriever` | `eea.climateadapt` | 10 | `items[*].source`, `items[*].href`, `items[*].url`, top-level `linkTo`, top-level `image` | All blocks (`block_type = None`) |
18
-
19
- **Key constraint:** `GenericBlockLinksRetriever` only checks **top-level** fields named exactly `url`, `href`, or `preview_image`. It does NOT recurse into lists, dicts, or nested structures. Any link stored in a non-standard field name or nested inside a list requires the `CCAObjectListLinksRetriever` (or a new custom retriever).
20
-
21
- ---
22
-
23
- ## Block-by-Block Analysis
24
-
25
- ### 1. Blocks WITH internal link fields — FULLY COVERED
26
-
27
- These blocks use standard top-level field names (`href`, `url`) that `GenericBlockLinksRetriever` catches, or their nested `items` are covered by `CCAObjectListLinksRetriever`.
28
-
29
- | Block | Field(s) | Widget | Covered By | Notes |
30
- |---|---|---|---|---|
31
- | **RedirectBlock** | `href` | `object_browser` | `GenericBlockLinksRetriever` | Standard `href` at top level |
32
- | **CountryMapObservatory** | `href` | `object_browser` | `GenericBlockLinksRetriever` | Standard `href` at top level |
33
- | **CollectionStatistics** | `href` | `object_browser` | `GenericBlockLinksRetriever` | Standard `href` at top level |
34
- | **ASTNavigation** | `href` (top-level) | `object_browser` | `GenericBlockLinksRetriever` | Main entry page link |
35
- | **ASTNavigation** | `items[*].href` | `object_browser` (in `object_list`) | `CCAObjectListLinksRetriever` | Nav items — `items` list with `href` field |
36
- | **ContentLinks** | `items[*].source` | `object_browser` (in `object_list`) | `CCAObjectListLinksRetriever` | `source` in items is explicitly handled |
37
- | **RelevantAceContent** | `items[*].source` | `object_browser` (in `object_list`) | `CCAObjectListLinksRetriever` | `source` in items is explicitly handled |
38
-
39
- ### 2. Blocks WITH internal link fields — NOT COVERED (GAP)
40
-
41
- These blocks have fields that store internal links (via `object_browser`, path strings, or similar) but the field name or structure is **not** recognized by any existing retriever.
42
-
43
- | Block | Field(s) | Widget / Type | Why Not Covered | Risk |
44
- |---|---|---|---|---|
45
- | **Listing** (standard, extended) | `linkHref` | `object_browser` | Field name is `linkHref` — not in `GenericBlockLinksRetriever` (`url`, `href`, `preview_image`) and not in `CCAObjectListLinksRetriever` (`linkTo`, `image`). The CCA retriever checks `linkTo` but Volto core uses `linkHref`. | **Medium** — The "Link to..." / "More..." button link is silently missed. |
46
- | **RASTBlock** | `root_path` | plain `string` (path) | Stores a plain path string (e.g., `/en/knowledge-and-data/...`), NOT a `resolveuid/` URL. The retrievers only match strings containing `resolveuid`. | **Low** — Editors type paths manually; no object_browser. Moving the target folder breaks the link with no warning. |
47
-
48
- ### 3. Blocks WITHOUT internal link fields — NO ACTION NEEDED
49
-
50
- These blocks either have no link-bearing fields, fetch content dynamically from the server, or use server-side `@components` views.
51
-
52
- | Block | Rationale |
53
- |---|---|
54
- | **C3SIndicatorsGlossaryBlock** | Empty schema. Content fetched from `@components` view `c3s_indicators_glossary_table`. |
55
- | **C3SIndicatorsListingBlock** | Empty schema. Content fetched from `@components` view `c3s_indicators_listing`. |
56
- | **C3SIndicatorsOverviewBlock** | Empty schema (category field commented out). Content fetched from `@components` view `c3s_indicators_overview`. |
57
- | **CaseStudyExplorer** | No schema file. Loads data from ArcGIS JSON endpoint (`@@case-studies-map.arcgis.json`). No content links stored in block data. |
58
- | **CountryMapHeatIndex** | No schema file. Renders country map from static GeoJSON + metadata endpoint. No content links in block data. |
59
- | **CountryMapProfile** | No schema file. Same pattern as CountryMapHeatIndex. No content links in block data. |
60
- | **CountryProfileDetail** | No schema file. Renders HTML from `@components` view `countryprofile`. |
61
- | **ECDEIndicators** | No schema file. Embeds CDS toolbox apps by region code. No content links in block data. |
62
- | **FilterAceContent** | Schema has only filter parameters (vocabularies, search text, sort). No `object_browser` or link fields. Results are fetched dynamically. |
63
- | **SearchAceContent** | Same as FilterAceContent — only filter/search parameters. No content links stored. |
64
- | **FlourishEmbedBlock** | `embed_code` is a `textarea` with raw HTML/JS. Not parsed by any retriever. Links (if any) are external Flourish URLs. |
65
- | **ReadMore** | Behavioral block only (labels, height, position). No links. |
66
- | **DataConnectedEmbedBlock** | Extends `@eeacms/volto-datablocks`. Only adds a `languageParam` string field. The base block's URL fields (if any) are handled by the base package's own mechanisms. |
67
- | **TransRegionSelect** | `region` is a vocabulary choice (not a link). Renders links dynamically from `@components` view. |
68
- | **TabsBlock (Spotlight)** | Container block. Links in child blocks are discovered recursively by `visit_blocks`. The spotlight variation's `image` field (in tab settings) is covered by `CCAObjectListLinksRetriever` (top-level `image`). |
69
-
70
- ---
71
-
72
- ## Summary of Gaps
73
-
74
- ### Gap 1: Listing block — `linkHref` field
75
-
76
- **Problem:** The standard Volto listing block stores its "More..." link in a field named `linkHref`. The `GenericBlockLinksRetriever` only scans `url`, `href`, `preview_image`. The `CCAObjectListLinksRetriever` scans `linkTo` and `image` — neither matches `linkHref`.
77
-
78
- **Impact:** If an editor configures a listing block with a "Link to..." destination, and that destination is moved or made private, the link integrity system will NOT report this listing block as a breacher.
79
-
80
- **Remediation options:**
81
- 1. **Extend `CCAObjectListLinksRetriever`** to also scan `linkHref` (add it to the top-level fields list alongside `linkTo` and `image`). This is the simplest fix — one line change.
82
- 2. **Register a dedicated `ListingBlockLinksRetriever`** adapted to `block_type = "listing"`. More explicit but more code.
83
-
84
- **Recommendation:** Option 1 — add `linkHref` to the top-level fields in `CCAObjectListLinksRetriever`.
85
-
86
- ### Gap 2: RASTBlock — `root_path` field
87
-
88
- **Problem:** `root_path` stores a plain content path (e.g., `/en/knowledge-and-data/rast`) as a string. It is NOT stored as `resolveuid/<UID>`, so even if the field name were recognized, `get_urls_from_value` would not match it (it checks for `resolveuid` in the string).
89
-
90
- **Impact:** If the root folder is moved, the RAST block silently points to a 404. No link integrity warning.
91
-
92
- **Remediation options:**
93
- 1. **Change the widget** to `object_browser` and store as `resolveuid/` — then add `root_path` to a retriever. This is a schema change with migration implications.
94
- 2. **Accept the risk** — the field is typed manually by editors and is inherently fragile regardless of link integrity.
95
- 3. **Add a custom deserializer** that converts the path to `resolveuid/` on save, then add `root_path` to a retriever.
96
-
97
- **Recommendation:** Option 2 (accept risk) for now — the field is a single path string used by a small number of blocks, and converting it to `object_browser` would be a larger UX change. Document the limitation.
98
-
99
- ---
100
-
101
- ## Coverage Matrix
102
-
103
- | Block | Link Fields | Generic Retriever | CCA Retriever | Gap? |
104
- |---|---|---|---|---|
105
- | RedirectBlock | `href` | ✅ | — | No |
106
- | CountryMapObservatory | `href` | ✅ | — | No |
107
- | CollectionStatistics | `href` | ✅ | — | No |
108
- | ASTNavigation | `href` (top) | ✅ | — | No |
109
- | ASTNavigation | `items[*].href` | ❌ | ✅ | No |
110
- | ContentLinks | `items[*].source` | ❌ | ✅ | No |
111
- | RelevantAceContent | `items[*].source` | ❌ | ✅ | No |
112
- | **Listing** | `linkHref` | ❌ | ❌ | **Yes** |
113
- | RASTBlock | `root_path` | ❌ | ❌ | Yes (low risk) |
114
- | FlourishEmbedBlock | `embed_code` | ❌ | ❌ | N/A (external) |
115
- | All others | (none) | — | — | No |
116
-
117
- ---
118
-
119
- ## Notes on plone.restapi / plone.volto Checkouts
120
-
121
- - **plone.restapi** is checked out at `backend/sources/plone.restapi/`. It provides `GenericBlockLinksRetriever` (fields: `url`, `href`, `preview_image`), `TextBlockLinksRetriever` (DraftJS), and `SlateBlockLinksRetriever`.
122
- - **plone.volto** is NOT checked out in `backend/sources/`. It is installed as a packaged dependency in the backend venv. No custom link integrity retrievers were found in the EEA policy package (`eea.volto.policy`) — it only provides serialization/deserialization transformers, not link retrievers.
123
- - The `CCAObjectListLinksRetriever` in `eea.climateadapt` is the **only** custom link integrity retriever in the project. It runs at order 10 (before Generic at order 1, but both return independent lists that are unioned).
124
-
125
- ---
126
-
127
- ## Recommendations
128
-
129
- 1. **Fix the Listing gap immediately** — add `linkHref` to `CCAObjectListLinksRetriever`'s top-level field scan (one-line change in `blocks_linkintegrity.py`).
130
- 2. **Consider adding `image` to Generic coverage analysis** — `CCAObjectListLinksRetriever` already covers `image`, but if a future block uses `image` without items, it would only be caught by CCA's retriever.
131
- 3. **Document the RASTBlock limitation** in the block's developer notes or BLOCKS.md.
132
- 4. **Future blocks:** Always name link fields `href` or `url` at the top level, or `items[*].href` / `items[*].source` for nested lists, to benefit from existing retrievers.
@@ -1,52 +0,0 @@
1
- # Volto Block Link Integrity Analysis Report - volto-cca-policy
2
-
3
- ## Objective
4
- Identify blocks within the `volto-cca-policy` add-on that contain internal links in fields or structures not covered by the standard Plone/Volto link integrity discovery mechanisms.
5
-
6
- ## Standard Coverage Recap
7
-
8
- The following mechanisms are provided by core packages:
9
-
10
- 1. **`plone.restapi` (Generic Retriever)**: Automatically extracts links from top-level fields: `url`, `href`, `preview_image`.
11
- 2. **`plone.restapi` (Visitors)**: Recursively visits sub-blocks stored in `blocks` or `data.blocks`.
12
- 3. **`plone.volto` (Visitors/Retrievers)**: Recursively visits sub-blocks stored in `columns`, `hrefList`, and `slides`.
13
- 4. **`eea.climateadapt` (Backend Custom Retriever)**: Specifically covers `items[*].source`, `items[*].href`, `items[*].url`, and top-level `linkTo` and `image`.
14
-
15
- ## Analysis of volto-cca-policy Blocks
16
-
17
- | Block (@type) | Field Location | Covered? | Reason / Mechanism |
18
- | :--- | :--- | :--- | :--- |
19
- | `ContentLinks` | `items[*].source` | **Yes** | `CCAObjectListLinksRetriever` (Backend) |
20
- | `RelevantAceContent` | `items[*].source` | **Yes** | `CCAObjectListLinksRetriever` (Backend) |
21
- | `ASTNavigation` | `items[*].href` | **Yes** | `CCAObjectListLinksRetriever` (Backend) |
22
- | `Listing` (Shadowed) | `linkTo` | **Yes** | `CCAObjectListLinksRetriever` (Backend) |
23
- | `RedirectBlock` | `href` | **Yes** | `GenericBlockLinksRetriever` (Core) |
24
- | `CountryMapObservatory`| `href` | **Yes** | `GenericBlockLinksRetriever` (Core) |
25
- | `CollectionStatistics` | `href` | **Yes** | `GenericBlockLinksRetriever` (Core) |
26
- | `TabsBlock` (Spotlight)| `tabs[*].blocks` | **NO** | `tabs` key is not visited by core visitors. |
27
- | `TabsBlock` (Spotlight)| `tabs[*].image` | **NO** | `tabs` structure is not scanned for link fields. |
28
- | `FlourishEmbedBlock` | `embed_code` | **NO** | Raw HTML/JS (requires parsing). |
29
- | `CaseStudyExplorer` | `adaptation_options_links` | **NO** | Raw HTML (often dynamic source). |
30
- | `RASTBlock` | `root_path` | **NO** | Hardcoded string path (not a UID). |
31
-
32
- ## Detailed Findings
33
-
34
- ### 1. TabsBlock (Spotlight Variation)
35
- The `TabsBlock` in `volto-cca-policy` uses a custom `tabs` key to store a dictionary of tab data. Each tab can contain its own sub-blocks (`blocks` key) and a promotional `image`.
36
- * **Sub-blocks Visibility**: Since neither `plone.restapi` nor `plone.volto` includes `tabs` in their `IBlockVisitor` implementations, the backend link integrity system is "blind" to any blocks placed inside a spotlight tab.
37
- * **Image Visibility**: The `image` field within a tab is nested inside the `tabs` object list/map, which is not scanned by the generic or CCA-specific retrievers.
38
-
39
- ### 2. FlourishEmbedBlock
40
- This block stores raw HTML or Javascript snippets for embedding Flourish charts. Internal links within these snippets are not tracked because they are not stored as structured data or `resolveuid/` patterns.
41
-
42
- ### 3. RASTBlock
43
- Uses a `root_path` field which stores an absolute path as a string (e.g., `/en/knowledge-and-data/...`). Link integrity tracking depends on `resolveuid/` patterns and `zc.relation` objects. Paths are not automatically tracked or updated if the target moves.
44
-
45
- ## Recommendations
46
-
47
- 1. **Expand Backend Retriever**: Update `CCAObjectListLinksRetriever` (or add a new one) to handle the `tabs` structure:
48
- * Visit each item in the `tabs` dictionary.
49
- * Extract links from the `image` field if present.
50
- * (Optional) If `tabs` items contain their own blocks, a custom `IBlockVisitor` should be registered to allow core recursion to reach them.
51
- 2. **Refactor RASTBlock**: If possible, change `root_path` to use a proper object browser widget and store a UID.
52
- 3. **Documentation**: Advise developers to stick to `blocks`, `columns`, or `slides` for sub-block storage, or `items` for list-based links to benefit from existing retrievers.
@@ -1,143 +0,0 @@
1
- # Understanding Link Integrity in Plone and Volto
2
-
3
- ## Use Case
4
- A user is editing a content item and decides to change its workflow state to "Private". Before this action is finalized, the system should check if other content items on the website are linking to this item. If such links exist, the user should be informed that these links will effectively "break" for public users (leading to an unauthorized screen).
5
-
6
- ## Goal
7
- Identify a programmatic way (ideally a REST API endpoint) to retrieve a list of content items that link to a specific object.
8
-
9
- ## Research Findings
10
-
11
- ### 1. `plone.app.linkintegrity`
12
- - **Mechanism**: Tracks internal links using the `zc.relation` catalog with the relationship name `isReferencing`.
13
- - **Logic**: Extracts links from Dexterity `RichText` fields and Volto blocks (via `plone.volto`).
14
- - **Querying**: Provides utility functions in `plone.app.linkintegrity.utils`, notably `getIncomingLinks(obj)`.
15
-
16
- ### 2. `plone.restapi`
17
- - **Existing Endpoints**:
18
- - **`/@linkintegrity?uids=<UID>`**: Returns "breaches" (items linking to the specified UIDs). This is the same logic used by Plone's delete confirmation screen.
19
- - **`/@relations?target=<UID>&relation=isReferencing`**: A more generic endpoint to query the relation catalog. Omitting the `relation` parameter returns all types of incoming relations (including `relatedItems`).
20
- - **Recommendation**: For the "warn before private" use case, `/@linkintegrity` is highly suitable because it returns structured data specifically designed for notifying users about broken links. However, `/@relations` is better if a simple list of *any* linking item is needed.
21
-
22
- ### 3. `plone.volto` / Volto Frontend
23
- - **Backend**: Ensures that internal links within Volto blocks (columns, teasers, etc.) are correctly indexed by `plone.app.linkintegrity`.
24
- - **Frontend Logic**:
25
- - Volto has a `linkIntegrityCheck` action in `@plone/volto/actions` that calls the `/@linkintegrity` endpoint.
26
- - The results are stored in the `linkIntegrity` reducer.
27
- - The `ContentsDeleteModal` component in Volto core is the canonical example of how to display these breaches.
28
- - **Workflow Integration**: The state transition dropdown is managed by the `Workflow` component (`@plone/volto/components/manage/Workflow/Workflow`).
29
-
30
- ## Recommended Solution
31
-
32
- To implement the "warn before private" feature:
33
-
34
- 1. **Backend Endpoint**: Use `GET /@linkintegrity?uids=<UID>`.
35
- 2. **Frontend Integration (Shadowing)**:
36
- - Shadow the core `Workflow` component by copying it to `frontend/src/addons/volto-cca-policy/src/customizations/volto/components/manage/Workflow/Workflow.jsx`.
37
- - Intercept the `onChange` handler in the shadowed component.
38
- - If the target state is "Private" (or similar), trigger the `linkIntegrityCheck`.
39
- - Show a confirmation modal (similar to `ContentsDeleteModal`) if breaches are found.
40
-
41
- ## Volto Implementation Details
42
-
43
- ### Shadowing Path
44
- ```
45
- frontend/src/addons/volto-cca-policy/src/customizations/volto/components/manage/Workflow/Workflow.jsx
46
- ```
47
-
48
- ### Logic Hook
49
- In the shadowed `Workflow.jsx`, modify the `transition` function:
50
-
51
- ```javascript
52
- const transition = (selectedOption) => {
53
- const isPrivateTransition = ['private', 'reject', 'retract'].includes(selectedOption.value) ||
54
- selectedOption.url.endsWith('/reject') ||
55
- selectedOption.url.endsWith('/retract');
56
-
57
- if (isPrivateTransition) {
58
- setPendingOption(selectedOption);
59
- dispatch(linkIntegrityCheck([content.UID]));
60
- setShowWarningModal(true);
61
- } else {
62
- executeTransition(selectedOption);
63
- }
64
- };
65
- ```
66
-
67
- ### Components to reuse
68
- - `Confirm` from `semantic-ui-react` for the modal wrapper.
69
- * **Existing Actions**: `linkIntegrityCheck` from `@plone/volto/actions`.
70
- * **Existing Reducers**: `state.linkIntegrity.result` to access the breaches.
71
- * **UI Reference**: `ContentsDeleteModal.jsx` in Volto core for the table rendering logic of broken links.
72
-
73
- ## Final Implementation
74
-
75
- The feature was implemented in the `volto-cca-policy` add-on on a dedicated branch.
76
-
77
- ### Git Branch
78
- - **Branch Name**: `link-integrity-workflow`
79
-
80
- ### Files Created/Modified
81
- 1. **Shadowed Component**: `src/customizations/volto/components/manage/Workflow/Workflow.jsx`
82
- - Shadowed from `@plone/volto/components/manage/Workflow/Workflow.jsx`.
83
- - Modified to intercept state changes to `private`, `reject`, and `retract`.
84
- - Integrated with `linkIntegrityCheck` action and `WorkflowLinkIntegrityModal`.
85
- 2. **New Component**: `src/components/manage/Workflow/WorkflowLinkIntegrityModal.jsx`
86
- - A custom confirmation modal that displays link integrity breaches.
87
- - Uses `semantic-ui-react` for the UI (Confirm, Table, Loader).
88
- - Accesses `state.linkIntegrity.result` to render the list of affected content.
89
- 3. **Components Index**: `src/components/index.js`
90
- - Exported `WorkflowLinkIntegrityModal` for use in the shadowed `Workflow` component.
91
-
92
- ### Logic Summary
93
- - **Trigger**: When the user selects a "Private" transition in the workflow dropdown.
94
- - **Verification**: The `linkIntegrityCheck` action is dispatched for the current object's UID.
95
- - **Race Condition Prevention**: The system explicitly waits for the `linkIntegrity.loaded` state to be true before deciding whether to auto-proceed or show the modal. This prevents transitions from executing prematurely due to stale or initial empty state.
96
- - **Activity Indicators (UX)**:
97
- - During the link integrity check, a `Dimmer` and `Loader` are shown within the `WorkflowLinkIntegrityModal` with the message "Checking references...".
98
- - During the actual workflow transition execution, a `Dimmer` and `Loader` are shown over the state selection dropdown to indicate that the transition is in progress.
99
- - **Interaction**:
100
- - If no incoming links exist (`breaches.length === 0`), the transition proceeds automatically once the check is loaded.
101
- - If incoming links are found, the `WorkflowLinkIntegrityModal` displays the list of referencing pages.
102
- - The user can either "Cancel" the transition or select "Change state anyway" to proceed.
103
-
104
- ## User Story: Testing the Link Integrity Warning
105
-
106
- ### Description
107
- As a Content Editor, I want to be warned when I am about to make a page private if other pages are linking to it, so that I can avoid creating broken links for visitors.
108
-
109
- ### Acceptance Criteria
110
- 1. **Positive Case (Breaches Found)**:
111
- - Given a "Target Page" that is published.
112
- - Given a "Source Page" that contains a link to "Target Page".
113
- - When I go to "Target Page" and select "Make Private" (or "Reject" / "Retract") from the state dropdown.
114
- - Then I should see a "Checking references..." loading indicator.
115
- - Then I should see a warning modal titled "Warning: Potential broken links".
116
- - Then the modal should list "Source Page" as an item that will have a broken link.
117
- - When I click "Cancel", the modal should close and the page should remain "Published".
118
- - When I click "Change state anyway", the modal should close and the page should transition to "Private".
119
-
120
- 2. **Negative Case (No Breaches)**:
121
- - Given a "Target Page" that is published and has NO incoming links.
122
- - When I select "Make Private" from the state dropdown.
123
- - Then I should see a brief "Checking references..." indicator.
124
- - Then the page should transition to "Private" immediately without showing a warning modal.
125
-
126
- ### Test Procedure
127
- 1. **Setup Content**:
128
- - Create a page named "Linked Page" and Publish it.
129
- - Create another page named "Referencing Page".
130
- - In "Referencing Page", add a Text block and insert an internal link to "Linked Page". Publish "Referencing Page".
131
- 2. **Verify Warning**:
132
- - Navigate to "Linked Page".
133
- - Open the state dropdown in the toolbar.
134
- - Select "Make Private".
135
- - **Observe**: The "Checking references..." dimmer should appear briefly.
136
- - **Verify**: The warning modal should appear listing "Referencing Page".
137
- 3. **Test Cancellation**:
138
- - Click "Cancel" in the modal.
139
- - **Verify**: The page is still in "Published" state.
140
- 4. **Test Confirmation**:
141
- - Select "Make Private" again.
142
- - Click "Change state anyway" in the modal.
143
- - **Verify**: The page state changes to "Private" and a success toast appears.