Skip to content

[JS] Cleanup after refactoring #22

@GuillaumeDua

Description

@GuillaumeDua

Makes everything looks cleaner, from a design (architecture) perspective

Library layout

  • name
  • version
  • description

Module

See #20

  • deploy using the CI so it's available
  • deplay min-size/obfuscated

Custom HTML elements

  • name consistency

Functions

  • cleaner prototype (pseudo-typed parameters)

Others

Promote consistency

  • hide warnings for undefined/fallback hljs language
  • soft errors (replace HTMLElement content with red error message, rather than stopping the process)
  • make Initialize_DivHTML_elements generic
  • Global option: force fallback language to ... [smthg]
  • per-codeSection CE configuration (local override global)
  • toggle technical info/warning logs
  • use ?? vs ||
  • execution -> pre.code rather than a new CS (+copy-to-cpliboard button)
  • buttons: bound to CS left-panel, not the element itself ?
  • check encapsulation/visibility
  • type = AwesomeCodeElement.details.${name} ?
  • update error messages -> ${classname}.name ?
  • named parameters
  • static vs. const ?
  • element name consistency ?
  • use arrow function: automatically captures the this value of the enclosing scope (rather than _this)
  • alias awesome-code-element -> ace ?
  • HTML_elements_name -> ace_${name}
  • check shadowroot-callbacks
  • dark_or_light -> color_scheme
  • console.xxxx -> replace '\n\t' by ','-seperated arguments ?
  • remove useless funcs, class (if any)
  • awesome-code-element.js: sub-modules aggregator
  • style : px vs. em
  • default policies : language, toggle_execution, toggle_parsing, presentation, etc.

👉 (see the existing TODO tags in sources for more)

Decouple CSS and JS

Metadata

Metadata

Assignees

Projects

Status

In Progress

Relationships

None yet

Development

No branches or pull requests

Issue actions