PUDL
Reference

Commands and folding toolbars

This is a preview of the toolbar and commands proposal, built so it can be tried before it is settled. The note editor below is an applet that declares each of its commands once, with its words, glyph, key and state, and names the commands each group of its toolbar holds. PUDL draws the toolbar from that, keeps every control's state current, answers the keys, and folds the groups as the room runs out.

Narrow the editor with the slider, or drag its corner, and watch the groups fold: first to their glyphs, then the lowest priority ones into menu buttons with their names, then to the glyphs alone, then into More. Every command stays in reach, ticked or chosen as it is. Try Ctrl+B, Ctrl+S or Ctrl+Alt+2 in the text.

1200px

The note editor needs script to run.

As an agent sees it

An agent never reads the toolbar. It lists the commands as data, with their state now and whether the toolbar shows them, has folded them or hides them, and runs one by its id. A disabled command refuses with its reason. In the console: pudlCommands.list(el) and pudlCommands.run('bold').

Press List the commands.

Actions, for agents with no page at all

The note editor also publishes actions: functions with a schema for what goes in and what comes out, which a script, a server or an agent can call without the toolbar, and some without the editor being open at all. Count a Note runs in a module of its own. Read, Save and Resolve are answered by the open editor. Ask for a Title asks you a question. Open in Notes is the applet's request verb, which PUDL publishes as an action by itself. The Word Count and Name the Note… commands in the Tools group call two of these actions.

This panel runs as an agent would, with no capabilities granted. An action that needs one, such as Save, which posts a notice, asks you first, through the page's pudlApplets.confirm.

Press List the actions.

Allow this action?