Skip to content

[Meta] Migration tooling bugs #160

Closed
3 of 4 issues completed
Closed

Description

@bmorelli25

Migration Tooling Bugs

The following bugs should be prioritized.

Output

Links

Unicode

The migration tool shouldn't output unicode. I see a lot of examples of this in the zip file: >,  , ’, etc.

Variables

  • @bmorelli25 convert asciidoc vars to yml and avoid var substitution
  • @siamakp-elastic maintain current use of - in variables (currently converts to _)
  • @siamakp-elastic to introduce temporary workaround in migration tooling
  • Variable substitution does not work in navigation_title frontmatter. To be fixed by @elastic/docs-engineering
    Screenshot here Image

Definition lists

We need a solution for this. See #109.

Tabs

  • @bmorelli25 right script that iterates through tabs and converts HTML to MD w/regex
    • script run with: python3 convert.py -dir path/to/dir/
  • @siamakp-elastic attempt to add regex HTML tab to MD functionality to migration tool

Dropdowns

Related to #107.

The migration script currently migrates dropdowns to following syntax:

```{admonition} 'Example 60. *Logs*'
:class: note dropdown

//content
```

We don't support this syntax in docs-builder. The syntax should be:

:::{dropdown} Dropdown Title

//content
:::

Note that an optional :open: parameter is also supported. I'm not sure if your migration tooling is handling the open-by-default dropdowns or not, @siamakp-elastic

Other bugs

Lower priority bugs to look into as time allows.

Table conversion

We should strip the table conversion syntax from:

```{table}
:width: auto
| <header> | <header> | <header> | ... |
| -------- | -------- | -------- | ... |
|  <text>  |  <text>  |  <text>  | ... |
|  <text>  |  <text>  |  <text>  | ... |
|  <text>  |  <text>  |  <text>  | ... |
|   ...    |   ...    |   ...    | ... |
```

to just

| <header> | <header> | <header> | ... |
| -------- | -------- | -------- | ... |
|  <text>  |  <text>  |  <text>  | ... |
|  <text>  |  <text>  |  <text>  | ... |
|  <text>  |  <text>  |  <text>  | ... |
|   ...    |   ...    |   ...    | ... |

Bullet points

When a bullet point only contains a link, it doesn't migrate?
Asciidoc link: https://www.elastic.co/guide/en/observability/current/monitor-k8s-otel-edot.html
MD link: http://localhost:5000/monitor-k8s-otel-edot.html

Screenshot here Image

Code block callouts

We had previously asked @siamakp-elastic to convert code callouts to footnotes. We now support callout syntax in docs-builder. The code callout syntax that we should update adoc-to-md is:

```go
transaction := apm.DefaultTracer().StartTransaction("GET /", "request") <1>
traceContext := transaction.TraceContext() <2>

// Send TraceContext to receiving service
traceparent := apmhttp.FormatTraceparentHeader(traceContext) <3>
tracestate := traceContext.State.String()
```

1. Start a transaction
2. Get `TraceContext` from current Transaction
3. Format the `TraceContext` or `tracestate` as a `traceparent` header.

In other words:

  • A code block can include <\d+> at the end to indicate code callouts.
  • A code block with this style of callouts needs to be followed by an ordered list with an equal amount of items as called out.

Questions for writers during bug bash

  1. We're currently choosing not to support inline admonitions. Provide examples if you think this choice is wrong. See [Discuss] Inline admonitions #108 & Add support for context-specific admonitions #94 (comment) for more info.
  2. We do not currently have syntax to convert definition lists into. What do we need to support here? How can we support this and also be prescriptive about how def lists are used? See [Discuss] Definition lists #109 for more info. Examples of def lists:

Sub-issues

Sub-issues

3 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. Mpdreamz commented on Jan 10, 2025

    @Mpdreamz
    Member

    Do note we do support the open option on all admonitions

    ```{admonition} 'Example 60. *Logs*'
    :open: true/false
    
    //content
    ```

    {dropdown} by itself just creates a collapsible section without any admonition styling.

  2. Mpdreamz commented on Jan 10, 2025

    @Mpdreamz
    Member

    @siamakp-elastic another note is that the output currently generates to docs/source at least the zip I saw. Can we make sure the conversions we put in place just render to docs ?

    The docs/source is a leftover from the POC days that we never got round to adjust. Will move the docs here and in the example repos to just /docs as well.

  3. bmorelli25 commented on Jan 10, 2025

    @bmorelli25
    MemberAuthor

    {dropdown} by itself just creates a collapsible section without any admonition styling.

    In the asciidoc docs all of our dropdowns are currently unstyled so I think this is the better fit. I'd also be interested in discussing whether or not we should support open in admonitions. If admonitions aim to draw attention to some information, I don't see a use case where they should be collapsed.

  4. Mpdreamz commented on Jan 10, 2025

    @Mpdreamz
    Member

    Ahh that makes sense @bmorelli25 !

    I think your argument to not support dropdown in admonitions makes a lot of sense.

    Just give me the go-ahead to rip it out :)

  5. bmorelli25 commented on Jan 10, 2025

    @bmorelli25
    MemberAuthor

    Just give me the go-ahead to rip it out :)

    Let's do it! 🔨

  6. bmorelli25 commented on Jan 13, 2025

    @bmorelli25
    MemberAuthor

    Related: #179 #178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions