Skip to content

Releases: google/playground-elements

v0.9.4

18 May 20:57
98dda80

Choose a tag to compare

Fixed

  • Fixed timeouts when using the default unpkg.com service worker origin,
    caused by comlink versions being out-of-sync between local components and
    remote service worker.

Added

  • Added readonly property to <playground-file-editor>.

v0.9.3

05 May 20:53

Choose a tag to compare

Changed

  • Error tooltips now follow --playground-code-font-family.
  • Optimized the UX for fast compile and display by switching to a leading edge
    debouncer and eliminating the minimum display time for the loading bar.

v0.9.2

26 Apr 16:26

Choose a tag to compare

Changed

  • Playground now executes code on the unpkg.com origin by default, meaning user
    code execution is now sandboxed by default. The sandbox URL can still be
    changed with the sandboxBaseUrl property or sandbox-base-url attribute,
    though it is highly advisable to always use a separate and unprivileged
    origin.

v0.9.1

20 Apr 04:59
645e4ac

Choose a tag to compare

Changed

  • Tab key now inserts 2 spaces instead of a tab character.

Fixed

  • Fixed missing vertical scrollbars.
  • Fixed transparent region between horizontal and vertical scrollbars.

v0.9.0

13 Apr 22:58

Choose a tag to compare

Changed

  • Focusing the editor using the Tab key no longer activates edit mode
    immediately. This prevents the Tab key from being trapped, which was an
    accessibility problem for keyboard users.

    Instead, when the editor is focused, users can now press Enter to begin
    editing, and Escape to stop editing. A prompt is displayed with these
    instructions when focused. Focusing the editor with a mouse click continues to
    activate edit mode immediately, as before.

  • The editor now uses the CodeMirror contenteditable input style, which has
    much better screen reader support.

  • Line numbers are now annotated with aria-hidden so that they are not voiced
    by screen readers.

  • Increased default line-height from normal to 1.4em.

  • Added a default padding-left of 1em.

  • Increased width of cursor from 1px to 2px.

  • Increased default tab font-size from 0.75rem to 0.8em;

  • Increased default --playground-bar-height from 35px to `40px.

  • --playground-cursor-color now defaults to the value of
    --playground-code-default-color.

  • --playground-code-gutter-background now defaults to the value of
    --playground-code-background.

  • --playground-code-gutter-margin-right default changed from 1px solid #ddd to none.

  • --playground-code-linenumber-color default changed from #999 to #767676.

Added

  • Added playground-styles.css and playground-styles.js which can be imported
    to apply Playground styles to server-side rendered code.

  • Added dialog CSS shadow part to code-editor, file-editor, and ide for
    styling modal dialogs that appear over the editor (currently just used for the
    keyboard help that shows when the editor is focused using the keyboard).

  • Added CSS custom properties:

    • --playground-code-line-height: line-height of code in the editor.
    • --playground-tab-bar-font-size: font-size of tabs in the file picker tab
      bar.
    • --playground-tab-bar-active-color: Text color of active file-picker tab.
    • --playground-tab-bar-indicator-color: color of the active tab indicator
      line (use transparent to hide).
    • --playground-tab-bar-active-background: background of the active file-picker tab.
  • Added aria-label attribute to reload, new file, and file context menu
    buttons.

  • Added title attribute to preview <iframe> element.

  • Added aria-label to the preview loading indicator, and set
    aria-hidden=true when the preview is not loading.

v0.8.0

02 Apr 21:48

Choose a tag to compare

Added

  • TypeScript type errors are now displayed inline. Previously, only syntax
    errors were displayed. Type errors may take slightly longer to appear than
    syntax errors, because they require fetching .d.ts files and running a more
    expensive compiler pass.

Changed

  • [BREAKING] Removed --playground-error-border property, and updated
    inline error style from a dashed border to a red squiggle.

v0.7.0

31 Mar 02:07

Choose a tag to compare

Changed

  • [BREAKING] Replaced files getter/setter on <playground-project> and
    <playground-ide> with config getter/setter. This property has the same
    type as the JSON config, and can be used to save/restore the state of all
    files and other configuration.

Fixed

  • TypeScript errors of the form Property '...' does not exist on type and
    Cannot find name '...' are now suppressed (temporarily until d.ts files
    are fetched).

v0.6.6

29 Mar 16:59

Choose a tag to compare

Fixed

  • Fixed missing @types/codemirror dependency.

v0.6.5

29 Mar 16:45

Choose a tag to compare

Fixed

  • Fixed missing lib/codemirror.js file in NPM package.

v0.6.4

29 Mar 16:21

Choose a tag to compare

Added

  • TypeScript errors are now displayed in the editor with red underlines. A
    tooltip displaying the error is shown on hover.

    • Note that only basic/syntactic errors are currently shown, because typings
      of dependencies are not currently available to compilation.
  • Added CSS property --playground-error-border, the border-bottom of code
    spans with an error (2px red dashed by default).

  • Added CSS shadow part diagnostic-tooltip for styling the tooltip that
    appears when hovering over an error.