Skip to content

Commit b2f54a5

Browse files
authored
Merge branch 'main' into more-guidance-versioning
2 parents dd047fc + d565b78 commit b2f54a5

File tree

31 files changed

+678
-395
lines changed

31 files changed

+678
-395
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ updates:
1717
day: 'monday'
1818
time: '08:00'
1919
groups:
20+
eslint:
21+
patterns:
22+
- 'eslint'
23+
- '@eslint/*'
24+
- 'typescript-eslint'
2025
eui:
2126
patterns:
2227
- '@elastic/eui*'

.github/workflows/preview-build.yml

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,17 @@ on:
4343
type: string
4444
default: 'false'
4545
required: false
46+
disable-comments:
47+
description: 'Disable comments'
48+
type: boolean
49+
default: false
50+
required: false
4651

4752
permissions:
4853
id-token: write
4954
deployments: write
5055
contents: read
51-
pull-requests: read
56+
pull-requests: write
5257

5358
jobs:
5459
match:
@@ -231,6 +236,81 @@ jobs:
231236
aws cloudfront create-invalidation \
232237
--distribution-id EKT7LT5PM8RKS \
233238
--paths "${PATH_PREFIX}" "${PATH_PREFIX}/*"
239+
240+
- name: Comment on PR
241+
continue-on-error: true
242+
if: startsWith(github.event_name, 'pull_request') && inputs.disable-comments != 'true' && env.MATCH == 'true' && steps.deployment.outputs.result && steps.check-files.outputs.all_changed_files
243+
uses: actions/github-script@v7
244+
env:
245+
ALL_CHANGED_FILES: ${{ steps.check-files.outputs.all_changed_files }}
246+
with:
247+
script: |
248+
const title = '## 🔍 Preview links for changed docs'
249+
const changedMdFiles = process.env.ALL_CHANGED_FILES
250+
.split(/\s+/)
251+
.filter(i => i.endsWith('.md'))
252+
.filter(i => !i.includes('/_snippets/'));
253+
254+
if (changedMdFiles.length === 0) {
255+
return;
256+
}
257+
258+
const toLink = (file) => {
259+
const path = file
260+
.replace('docs/', '')
261+
.replace('/index.md', '')
262+
.replace('.md', '');
263+
return `[${file}](https://docs-v3-preview.elastic.dev${process.env.PATH_PREFIX}/${path})`;
264+
}
265+
266+
const links = changedMdFiles.map(toLink)
267+
268+
const body = [
269+
title,
270+
...links.slice(0, 10).map(i => `- ${i}`),
271+
]
272+
273+
if (links.length > 10) {
274+
body.push('<details>');
275+
body.push('<summary>More links …</summary>');
276+
body.push('');
277+
for (const link of links.slice(10, 100)) {
278+
body.push(`- ${link}`);
279+
}
280+
body.push('');
281+
body.push('</details>');
282+
}
283+
284+
if (links.length > 100) {
285+
body.push('');
286+
body.push(`<sub>In total, ${links.length} files changed.</sub>`);
287+
}
288+
289+
const owner = context.repo.owner;
290+
const repo = context.repo.repo;
291+
const issue_number = context.payload.pull_request.number;
292+
293+
// Post or update a single bot comment
294+
const { data: comments } = await github.rest.issues.listComments({
295+
owner, repo, issue_number
296+
});
297+
const existing = comments.find(c =>
298+
c.user.type === 'Bot' &&
299+
c.body.startsWith(title)
300+
);
301+
if (existing) {
302+
await github.rest.issues.updateComment({
303+
owner, repo,
304+
comment_id: existing.id,
305+
body: body.join('\n'),
306+
});
307+
} else {
308+
await github.rest.issues.createComment({
309+
owner, repo,
310+
issue_number,
311+
body:body.join('\n'),
312+
});
313+
}
234314
235315
- name: Update Link Index
236316
if: |

Directory.Packages.props

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<PackageVersion Include="Amazon.Lambda.S3Events" Version="3.1.0" />
1414
<PackageVersion Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.4.4" />
1515
<PackageVersion Include="Amazon.Lambda.SQSEvents" Version="2.2.0" />
16-
<PackageVersion Include="AWSSDK.CloudFront" Version="4.0.0.10" />
17-
<PackageVersion Include="AWSSDK.CloudFrontKeyValueStore" Version="4.0.0.9" />
1816
<PackageVersion Include="AWSSDK.Core" Version="4.0.0.2" />
1917
<PackageVersion Include="AWSSDK.SQS" Version="4.0.0.1" />
2018
<PackageVersion Include="AWSSDK.S3" Version="4.0.0.1" />

docs/migration/guide/mapping.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ navigation_title: What books were migrated?
66

77
We did not migrate all Elastic documentation. We are purposefully leaving the majority of content behind in the legacy Asciidoc build system. This system will turn into our documentation archive.
88

9-
A full list of the content that was migrated to the V3 format is available [here](https://github.com/elastic/asciidocalypse/blob/main/docs/readme.md).
9+
A full list of the content that was migrated to the V3 format is available [here](https://github.com/elastic/asciidocalypse/tree/main-archive/docs#readme).

docs/migration/versioning.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ In this new system, documentation is written **cumulatively**. This means that a
2020
In Docs V3, a single branch is published per repository. This branch is set to `main` by default, but it is possible to instead publish a different branch by changing your repository's branching strategy. You might want to change your branching strategy so you can have more control over when content added for a specific release is published.
2121

2222
* [Learn how to choose the right branching strategy for your repository](/contribute/branching-strategy.md)
23-
* [Learn how to set up your selected branching strategy](/configure/content-sources.md)
23+
* [Learn how to set up your selected branching strategy](/configure/content-sources.md)

docs/syntax/applies.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,38 @@ applies_to:
248248
---
249249
```
250250

251-
## Inline Examples
252251

253-
### Stack
252+
## Look and feel
253+
254+
### Block
255+
256+
```{applies_to}
257+
stack: preview 9.1
258+
serverless: planned
259+
260+
apm_agent_dotnet: ga 1.0.0
261+
apm_agent_java: beta 1.0.0
262+
edot_dotnet: preview 1.0.0
263+
edot_python:
264+
edot_node: ga 1.0.0
265+
elasticsearch: preview 9.0.0
266+
security: removed 9.0.0
267+
observability: deprecated 9.0.0
268+
```
269+
270+
### Inline
271+
272+
#### In text
273+
274+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam. Mauris sed eleifend erat,
275+
sit amet auctor odio. Donec ac placerat nunc. {applies_to}`stack: preview` Aenean scelerisque viverra lectus
276+
nec dignissim. Vestibulum ut felis nec massa auctor placerat. Maecenas vel dictum.
277+
278+
- {applies_to}`elasticsearch: preview` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam. Mauris sed eleifend erat, sit amet auctor odio. Donec ac placerat nunc.
279+
- {applies_to}`observability: preview` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam.
280+
- {applies_to}`security: preview` Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut libero diam. Mauris sed eleifend erat, sit amet auctor odio. Donec ac placerat nunc. Aenean scelerisque viverra lectus nec dignissim.
281+
282+
#### Stack
254283

255284
| `applies_to` | result |
256285
|--------------------------------------------|--------------------------------------|
@@ -281,7 +310,7 @@ applies_to:
281310
| `` {applies_to}`stack: removed 9.1` `` | {applies_to}`stack: removed 9.1` |
282311
| `` {applies_to}`stack: removed 99.0` `` | {applies_to}`stack: removed 99.0` |
283312

284-
### Serverless
313+
#### Serverless
285314

286315
| `applies_to` | result |
287316
|-------------------------------------------------|-------------------------------------------|

docs/testing/req.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1+
---
2+
applies_to:
3+
stack: ga
4+
serverless:
5+
elasticsearch: ga
6+
mapped_pages:
7+
- https://www.elastic.co/guide/en/elasticsearch/reference/current/es-connectors-usage.html
8+
---
19
# Requirements
210

11+
```{applies_to}
12+
stack: preview 9.0, ga 9.1
13+
```
14+
15+
16+
{applies_to}`stack: preview 9.0` This tutorial is based on Elasticsearch 9.0.
17+
This tutorial is based on Elasticsearch 9.0. This tutorial is based on Elasticsearch 9.0.
18+
This tutorial is based on Elasticsearch 9.0.
19+
20+
what
21+
22+
323
To follow this tutorial you will need to install the following components:
424

25+
26+
527
- An installation of Elasticsearch, based on our hosted [Elastic Cloud](https://www.elastic.co/cloud) service (which includes a free trial period), or a self-hosted service that you run on your own computer. See the Install Elasticsearch section above for installation instructions.
628
- A [Python](https://python.org) interpreter. Make sure it is a recent version, such as Python 3.8 or newer.
729

src/Elastic.Documentation.Configuration/Versions/Version.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public enum VersioningSystemId
8282
[Display(Name = "edot_php")]
8383
EdotPhp,
8484
[Display(Name = "edot_python")]
85-
EdotPython
85+
EdotPython,
86+
[Display(Name = "edot_cf_aws")]
87+
EdotCfAws
8688
}
8789

8890
[YamlSerializable]

src/Elastic.Documentation.Configuration/versions.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,7 @@ versioning_systems:
8585
edot_python:
8686
base: 1.0
8787
current: 1.3.0
88+
edot_cf_aws:
89+
base: 0.1
90+
current: 0.1.6
91+
Lines changed: 30 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,48 @@
11
@layer components {
2-
.applies,
3-
.applies-inline {
2+
.applies {
43
cursor: default;
54

5+
@apply text-subdued;
6+
67
[data-tippy-content]:not([data-tippy-content='']) {
7-
cursor: help;
8-
border-radius: 9999px;
9-
&:hover {
10-
text-decoration: underline;
11-
}
8+
@apply cursor-help;
129
}
1310

14-
.applicable-meta-removed {
15-
color: var(--color-red-90);
16-
}
17-
.applicable-meta-ga {
18-
color: var(--color-green-90);
19-
}
20-
.applicable-meta-technical-preview {
21-
color: var(--color-blue-elastic-80);
22-
}
23-
.applicable-meta-deprecated {
24-
color: var(--color-pink-90);
11+
.applicable-info {
12+
@apply border-grey-20 inline-grid cursor-default grid-cols-[auto_1fr_auto] rounded-full border-[1px] bg-white pt-1.5 pr-3 pb-1.5 pl-3;
2513
}
26-
.applicable-meta-beta {
27-
color: var(--color-poppy-90);
14+
15+
.applicable-name,
16+
.applicable-meta {
17+
@apply text-xs text-nowrap;
2818
}
29-
.applicable-meta-planned {
30-
color: var(--color-grey-90);
19+
20+
.applicable-separator {
21+
width: 1px;
22+
height: 100%;
23+
background-color: var(--color-grey-20);
24+
margin-left: calc(var(--spacing) * 2);
25+
margin-right: calc(var(--spacing) * 2);
3126
}
3227
}
3328

34-
.applies {
35-
@apply font-sans;
36-
border-bottom: 1px solid var(--color-grey-20);
37-
padding-bottom: calc(var(--spacing) * 3);
38-
font-variant: all-petite-caps;
29+
.applies.applies-block {
30+
@apply border-b-grey-20 flex flex-wrap gap-2 border-b-1 pb-4;
31+
}
3932

40-
.applicable-info {
41-
padding: calc(var(--spacing) * 0.5);
42-
padding-left: calc(var(--spacing) * 2);
43-
padding-right: calc(var(--spacing) * 2);
44-
margin: calc(var(--spacing) * 0.5);
45-
display: inline-block;
46-
font-size: 0.8em;
47-
border-radius: 0.4em;
48-
background-color: var(--color-white);
49-
border: 1px solid var(--color-grey-20);
50-
}
51-
.applicable-version {
52-
font-weight: bold;
53-
margin-left: calc(var(--spacing) * 0.5);
54-
font-variant: none;
55-
font-size: 0.87em;
33+
.applies.applies-inline {
34+
display: inline-block;
35+
vertical-align: bottom;
36+
.applicable-separator {
37+
margin-left: calc(var(--spacing) * 1.5);
38+
margin-right: calc(var(--spacing) * 1.5);
5639
}
57-
.applicable-lifecycle {
58-
font-weight: bold;
59-
}
60-
}
61-
.applies-inline {
62-
@apply font-sans;
63-
font-variant: all-petite-caps;
6440
.applicable-info {
65-
cursor: default;
66-
padding: calc(var(--spacing) * 0.5);
67-
padding-left: calc(var(--spacing) * 2);
68-
padding-right: calc(var(--spacing) * 2);
69-
margin-left: calc(var(--spacing) * 0.5);
70-
margin-right: calc(var(--spacing) * 0.5);
71-
display: inline-block;
72-
font-size: 0.8em;
73-
border-radius: 0.4em;
74-
background-color: var(--color-white);
75-
border: 1px solid var(--color-grey-20);
76-
font-weight: normal;
77-
}
78-
.applicable-version {
79-
font-weight: bold;
80-
margin-left: calc(var(--spacing) * 0.5);
81-
font-variant: none;
82-
font-size: 0.87em;
41+
@apply rounded-sm pt-1 pr-1.5 pb-1 pl-1.5;
8342
}
84-
.applicable-lifecycle {
85-
font-weight: bold;
43+
.applicable-name,
44+
.applicable-meta {
45+
font-size: 0.65em;
8646
}
8747
}
8848
}

0 commit comments

Comments
 (0)