Document using TypeScript and ES6 modules for extensions.

Review Request #12955 — Created April 14, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

This change updates the extension static media documentation to explain
what is needed to enable the use of TypeScript and ES6 modules (as well
as ES6 more generally) in extensions.

The only part that's still missing is an explanation of how to import
code from the Review Board/Djblets JavaScript codebase. I'm undecided if
that's something we should document now (and perhaps enable via some
symlinks like .reviewboard/.djblets during the setup.py develop
process), or if we should wait until more of those codebases have been
converted to modules.

Built HTML and checked output.

Summary ID
Document using TypeScript and ES6 modules for extensions.
This change updates the extension static media documentation to explain what is needed to enable the use of TypeScript and ES6 modules (as well as ES6 more generally) in extensions. The only part that's still missing is an explanation of how to import code from the Review Board/Djblets JavaScript codebase. I'm undecided if that's something we should document now (and perhaps enable via some symlinks like `.reviewboard`/`.djblets` during the `setup.py develop` process), or if we should wait until more of those codebases have been converted to modules. Testing Done: Built HTML and checked output.
317a127264ad4346902ae3f7e27072ee3ea97f3e
Description From Last Updated

Can you add reference IDs for these sections, so we can more easily link to them later?

chipx86chipx86

We should aim for shorter paragraphs. Any new piece of information should be a paragraph. This will help with SEO …

chipx86chipx86

The respective orderings here are wrong.

chipx86chipx86

Missing trailing period.

chipx86chipx86

Two blank lines before reference definitions.

chipx86chipx86

Similarly, "This can be customized ..." would be a good point to split the paragraph into a new one.

chipx86chipx86

"With the rollup.config.js example above..." would be a good new paragraph.

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    Can you add reference IDs for these sections, so we can more easily link to them later?

  3. docs/manual/extending/extensions/static-files.rst (Diff revision 1)
     
     
     
     
     
     
    Show all issues

    We should aim for shorter paragraphs. Any new piece of information should be a paragraph. This will help with SEO in general (if it's easier to skim, it's better).

    Let's take that last sentence, make it its own paragraph, and use it to prefix a bullet point list of some modern features. We can link to ES6 Modules, list ES6 classes, and maybe link to Spina.

  4. Show all issues

    The respective orderings here are wrong.

  5. Show all issues

    Missing trailing period.

  6. Show all issues

    Two blank lines before reference definitions.

  7. docs/manual/extending/extensions/static-files.rst (Diff revision 1)
     
     
     
     
     
     
    Show all issues

    Similarly, "This can be customized ..." would be a good point to split the paragraph into a new one.

  8. Show all issues

    "With the rollup.config.js example above..." would be a good new paragraph.

  9. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (f96369d)