Skip to content

Conversation

@amotl
Copy link
Member

@amotl amotl commented Dec 20, 2022

Some copy editing across the board, with a focus on wording, linking, and formatting.

@amotl amotl force-pushed the amo/doctests-refactoring branch from 6090d53 to 5dc0e04 Compare December 20, 2022 21:41
@amotl amotl force-pushed the amo/docs-improve-linking branch from f7b4252 to a09ee15 Compare December 20, 2022 21:43
Base automatically changed from amo/doctests-refactoring to master December 21, 2022 23:41
@amotl amotl force-pushed the amo/docs-improve-linking branch 2 times, most recently from e8effb4 to 8afd8a7 Compare December 25, 2022 00:20
@amotl amotl changed the title Documentation: Improve wording, linking, and formatting Documentation: Modernization and copy-editing Dec 25, 2022
@amotl amotl marked this pull request as ready for review December 25, 2022 00:28
Improve wording, linking, and formatting.
@amotl amotl force-pushed the amo/docs-improve-linking branch from 8afd8a7 to c1fd85c Compare December 27, 2022 11:42

In addition to the `Object`_ type, the CrateDB SQLAlchemy dialect also provides
a ``ObjectArray`` type, which is structured as a `list`_ of `dictionaries`_.
a ``ObjectArray`` type, which is structured as a :class:`py:list` of
Copy link
Member

@hammerhead hammerhead Dec 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice to have those direct links! Do you know why one renders in bold and the other one doesn't?

Screenshot 2022-12-27 at 13 02 01

image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's weird, thanks for spotting. I do not have an idea yet, why this is happening.

Copy link
Member Author

@amotl amotl Dec 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observations I

<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.11)">
  <code class="docutils literal notranslate">
    <span class="pre">list</span>
  </code>
</a>
<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.11)">
  <code class="xref py py-class docutils literal notranslate">
    <span class="pre">dictionaries</span>
  </code>
</a>

It looks like the xref class (from basic.css) adds the font-weight: bold; CSS directive.

Observations II

Funny enough, when rendering locally (not on RTD), those additional code tags, including the corresponding classes, are not rendered at all. Instead, the HTML looks like this:

<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#lists">list</a>
<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict">dictionaries</a>

And visually, it looks like this, which I think would be good.
image

Next steps

So, I guess we will need to find out why the HTML output is different when being built on/by RTD.

Copy link
Member Author

@amotl amotl Dec 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After resetting my local sandbox environment, I am also getting the same results as above, where the rendered HTML at this spot includes <code> tags, and where the same CSS classes xref py py-class are present on the :class:dictionaries <py:dict> link.

It looks like the custom label, dictionaries, is responsible for the additonal xref py py-class classes, and xref makes the link label render in bold.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not been able to discover the root cause, so I fixed it with crate/crate-docs-theme#366.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the patch to crate-docs-theme, it now looks like this:

image

@amotl amotl force-pushed the amo/docs-improve-linking branch from 285dc2d to c1d94b5 Compare December 29, 2022 12:00
@amotl amotl merged commit e6e1fe8 into master Dec 29, 2022
@amotl amotl deleted the amo/docs-improve-linking branch December 29, 2022 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants