Skip to content

v0.21.0

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Nov 14:22
· 1 commit to main since this release
2988e5f

What 0.21.0 asks of your product

A parameter arrives decoded, and a path keeps the address's encoded form

Reaches you if a plugin reads route parameters or builds an address from a value.

Every :param value arrives decoded: ctx.activeContent().params, paramMap on a routed
component, the params a sandboxed surface is pushed and the params a tab address resolver
receives. Every path stays in the encoded form the address bar shows. Calling decodeURIComponent
on a parameter again is wrong, and it throws on a value like 50%.

What to do:

  • Remove any decodeURIComponent you call on a parameter.
  • Write a value into an address with encodeURIComponent, also a value you read from a parameter.
    A TabAddressResolver returns an encoded address in the same way.
ctx.openContentTab({ path: `doc/${encodeURIComponent(doc.id)}`, title: doc.name, titleIsLiteral: true });

An address that no route declares belongs to no plugin, so the plugin of the home route no longer
owns it. A frame's navigation target with a dot segment or a backslash is refused.
Putting a value into an address has both
forms field by field.

Formatted text from a plugin carries no style and no form

Reaches you if a plugin renders Markdown with lw-markdown and puts HTML into it.

A <style> element and every style and class attribute are removed, and so are form controls
and the attributes that send a form. The text inside a removed control stays as plain text. A
task-list item keeps its text and loses its checkbox.

What to do: move styled or interactive markup out of the Markdown and into your own template.

A tab's onClose runs when the last pane holding it lets it go

Reaches you if a plugin frees state in onClose.

It runs once, whichever way the tab left its last pane: its close control, closeContentTab, a
pane closing, a split undone, a container going or a reset of the active workspace. It does not run
while a split or a container still shows the tab, or when another workspace is shown.

What to do: free per-tab state there, and do not expect it while another pane still shows the tab.

A close veto is also asked when a tab changes panes

Reaches you if a surface implements surfaceBeforeClose or holds unsaved work.

Moving a tab to another pane builds it anew there, so the workbench asks first. The unsaved-work
question and the surface's veto are asked on a move and on a hand-over to a neighbouring pane. A
refusal leaves the tab where it was.

What to do: write the veto for "this instance ends", not for "the tab goes away". A test that drags
a tab holding unsaved work now meets the question.
Unsaved changes
describes the hook.

A frame plugin replaces only its own contributions

Reaches you if a product relied on a frame plugin overriding something another owner registered.

A frame plugin, composed, deployed or installed, that registers a route, a view, a menu entry or a
settings section under an id or address another owner holds is refused. The console names both.
The distribution and the plugins composed into it as its own code replace as before.

A content route is now replaced by its address, so /orders, orders/ and orders are one
route. A catalogue entry cannot take the id of a plugin composed as the application's own code. A
menu heading's picture from a frame must be an http(s) address.

What to do: register the replacement from the distribution or from a plugin that runs in the page.
Rename a catalogue entry that collides with a composed plugin.
Contribution ids and collisions has the rule.

A frame plugin cannot take an address under another owner's

Reaches you if a frame plugin registers content below an address the product or another plugin
answers.

A frame plugin that registers orders/:id while another owner holds orders is refused, and the
console names both addresses and both owners. Between frame plugins the first keeps the address.
The distribution and the plugins composed into it win whichever registers first, so a frame
plugin's address is withdrawn when they register one above it. The home address counts as no
one's. An owner of a top-level parameter address such as :page leaves a frame plugin no address of
two or more segments.

What to do: give the frame plugin's content an address of its own, or register it from the
application's own code.

A frame plugin that could not be loaded is named where its view was

Reaches you if a product tells its users what a missing view means.

When a frame plugin does not connect, a view at an address it answered before says that the plugin
could not be loaded, names it and offers Try again. "This view does not exist" stays for an
address no plugin answered. The workbench keeps the addresses in the working-state key
lw.shell.frame-plugin-addresses.

What to do: nothing, unless your working-state store lists the keys it accepts. Then add this one.

ContributionRegistry.actionsOf and ownerOfSurface are removed

Reaches you if the product reads the registry itself.

Both are replaced by surfacesOf(id), which lists every registered surface under that id, each
with its pluginId and its actions. The calls retitleSurface, updateSurfaceAction and
updateSurfaceBadge reach only that owner's surface where a plugin id is passed, and every owner's
where none is.

const actions = registry.surfacesOf('orders').flatMap((surface) => surface.actions ?? []);

A toolbar cell or a component in a bar with an unmet access is hidden

Reaches you if such a contribution declares access with the disable mode.

A toolbar cell and a component in a bar are hidden while the session does not meet their
requirement, whatever their mode, as their descriptions say. A host-drawn button keeps its mode.
What to do: nothing, unless a test expected the inert control.
Access gating lists every kind.

The frame kit's declarations extend the tag-name map

Reaches you if a sandboxed surface written in TypeScript declared the lw-* tags itself.

The kit's declarations merge LwElementTagNameMap into the DOM's own map, so createElement and
querySelector answer with each element's shape. A declaration of your own for the same tags now
conflicts. What to do: drop your own entries.
Writing the surface in TypeScript
lists what the kit describes.

A translation namespace named like a workbench group is dropped

Reaches you if a plugin contributes a namespace such as workspace, retention or content.

Such a namespace is dropped with a warning, because it would reword the workbench's own strings.
What to do: name the namespace after your plugin's id.

retention.closeAnyway is now retention.goAheadAnyway

Reaches you if the product rewords the workbench or serves a language the workbench does not ship.

The escape in the slow-plugin dialog now reads "Go ahead anyway", because it also lets a move go
ahead. An override of retention.closeAnyway is no longer shown. The release also adds
retention.moveDropped, content.loadFailed, route.pluginFailedMessage and
workspace.changedMark, and retention.vetoPendingMessage has new wording.

What to do: move your override to retention.goAheadAnyway. Translate the new keys in a language
file of your own, where they are shown in English until you do.
Rewording the shell describes the overlay.

activateUpdate may resolve without reloading

Reaches you if the product or a plugin calls activateUpdate.

It asks about unsaved work in this window before it applies anything. Where the user declines, the
update is abandoned and the promise resolves with no reload. Where activating the new version fails,
nothing reloads either: the user is told with update.activationFailed, also where the product
announces updates itself, and the update stays on offer. What to do: do not put code after the
await that assumes the window is on its way out. Translate the new key where you serve a language
the workbench does not ship.

A first sign-in that never finishes adopting is given up

Reaches you if the product uses provideIdentityScopedStores with a store that may not answer, or
registers a handler with StateSyncService.onNamespaceAdopted.

An adoption that has not settled after ten seconds is given up. Writes held during it are stored in
the person's namespace, nothing is copied from or deleted in the anonymous one, and the user is told
with auth.localWorkKept. The next session that begins anonymously adopts again.

What to do: make a handler return within that time. Translate the new key where you serve a language
the workbench does not ship.

A key something handled runs no command

Reaches you if the product binds commands to keys that also reach a field or a plugin's own handler.

A key event that was already handled (preventDefault) or is part of a composition runs no
command. In a text field, a key that types a character runs no chord, also with Alt or AltGr. So a
chord on Ctrl+Alt+Shift with a digit or a punctuation key does not run inside a text field. Escape
inside the compact drawer closes it unless the view prevented the key.

What to do: bind such a command to a key that does not type, and call preventDefault in a view
that handles Escape itself.

Three palette values moved, and caution is not a text colour

Reaches you if a test compares colours or a stylesheet uses caution for text.

Light negative moves from #d14343 to #cc3333, dark negative from #e06464 to #e47272, and
light caution from #b8841f to #b27f1e. In the light theme caution stays below 4.5:1 as text.
What to do: use caution as a fill or an icon and write the words beside it in content.
Design tokens has the table.

An agent connection forgets open calls when a run starts

Reaches you if the product uses @loomweaver/ag-ui.

A call left open by a run that broke off is neither run nor answered in the next run. A hook that
throws or rejects now refuses the call. A tool whose command has no description is no longer
described by its title.

What to do: put the flush loop in a finally around the run, and give each command an agent may
call a description. Agent tools shows the loop.

init in an Nx workspace refuses changed files

Reaches you if a script runs loomweaver init in an Nx workspace.

It refuses to replace a bootstrap file that is not what the @nx/angular 24 application generator
writes with default options. It names that file and stops before installing anything. It first
brings an installed @loomweaver/devkit to its own version. The application's tsconfig*.json
and eslint.config.mjs are never replaced.

What to do: run init --dry-run to see what it would create, replace or change. Wire a developed
application by hand, as Manual setup describes.

revealSurface chooses among the copies of a view

Reaches you if a plugin calls ctx.revealSurface for a view the person can open in the content
area as well as in its sidebar.

Where the view stands in several places, the copy that was current most recently is made current.
Without any such history, the copy in the pane that carries the address wins, and otherwise the
first in reading order. It used to be whichever copy the workbench found first.

What to do: nothing, unless a test expected the sidebar copy after the person had used the other.

A strip that may not be reordered keeps its order

Reaches you if a distribution switches content.reorderTabs or sidebar.reorderViews off.

A tab activated while it is hidden in the strip's overflow keeps its place. The strip scrolls to
show it, and the list of open tabs marks it. On a strip the user may reorder, it still moves to the
front of its band.

What to do: nothing, unless a test expected the tab at the front.

Adding a tab to a pane moves the address there

Reaches you if a test opens an item through the add-tab button of a pane that does not carry the
address.

The pane takes the address once the item is open, as a click on one of its tabs does. A button that
only splits, minimises, maximises or closes leaves the address where it was.

What to do: nothing, unless a test expected the address to stay in the other pane.

The whole guide: https://loomweaver.dev/updating/

What's Changed

  • docs: what updating to a new release asks of a product by @yesbert in #843
  • chore: the demo and the example run on 0.20.0 by @yesbert in #842
  • chore: every minor release says what it asks of a product by @yesbert in #844
  • docs: archive the-audit-before-0-20-0 by @yesbert in #845
  • docs: on loopback the first visit waits for the worker's prefetch by @yesbert in #846
  • fix: the thirteen findings SonarQube failed main's gate on by @yesbert in #847
  • docs: the worklist of the review before the next release by @yesbert in #848
  • fix: an agent's open call does not outlive its run, and four tests can fail again by @yesbert in #849
  • fix: init leaves a developed application alone, and the scaffolds produce code that builds where they did not by @yesbert in #851
  • fix: the plugin trust boundary holds against a catalogue entry, a late failure and a foreign owner by @yesbert in #850
  • fix: the demo's search offers only what it can run, and an isolated plugin is not promised offline by @yesbert in #853
  • fix: five guards see what they were written for, and a release that failed part-way can be run again by @yesbert in #855
  • fix: a menu keeps the keyboard where it opens, and a key something handled runs no command by @yesbert in #854
  • fix: a tab that changes panes asks before it destroys unsaved work by @yesbert in #852
  • test: fifteen end-to-end tests assert what their names say by @yesbert in #857
  • fix: the workbench does what the plugin contract says in eleven places it did not by @yesbert in #858
  • fix: a component in a bar keeps its instance, and the compact drawer holds the focus by @yesbert in #856
  • fix: applying an update asks about unsaved work before it activates anything by @yesbert in #859
  • fix: a workspace's marks follow its reset, and giving way or removing one asks about everything it holds by @yesbert in #860
  • fix: an address keeps one form end to end, a tab's close hook runs when its last holder goes, and a first sign-in keeps what the workbench holds by @yesbert in #861
  • docs: each task of the worklist is listed once by @yesbert in #862
  • fix: a sidebar move announces itself only once it happened, and a dropped move says so by @yesbert in #863
  • docs: what 0.21.0 asks of a product by @yesbert in #864
  • fix: the keyboard keeps its place after every pane action, and a tab moves between panes without a pointer by @yesbert in #865
  • fix: the bundle guard counts every file the browser fetches before it renders by @yesbert in #866
  • fix: the last SonarQube finding, and the worklist closes by @yesbert in #867
  • test: the frame kit's two type-checking tests have the time a compile takes under coverage by @yesbert in #868
  • docs: archive the-review-before-the-next-release by @yesbert in #869
  • fix: plugin markdown carries no style and no forms, and the address form is a guarantee by @yesbert in #870
  • docs: every long requirement reads shorter and states the same by @yesbert in #871
  • fix: a bar folds its buttons before it cuts the product's name by @yesbert in #874
  • fix: an update that cannot activate keeps the session, and an adoption that never answers gives up by @yesbert in #872
  • fix: bring forward finds the copy last used, a fixed strip keeps its order, and add-tab moves the address by @yesbert in #875
  • fix: a frame plugin claims no address under another owner's, and one that cannot load says so by @yesbert in #873
  • docs: archive the four changes behind the owner's decisions by @yesbert in #876
  • chore: bump version to 0.21.0 by @yesbert in #877
  • fix: the three SonarQube findings before 0.21.0 by @yesbert in #878

Full Changelog: v0.20.0...v0.21.0