Changelog
Source:NEWS.md
stagemap 0.0.0.9000
The first R API (
stagemap(), thesm_*()functions that set stages, lanes, kinds, groups, status and layout,sm_svg(),sm_trace(),sm_orphans()andsm_missing()) is replaced by a rebuild as anhtmlwidgetswidget with a bundled JavaScript engine; this is before the first release (#57).stage_map()draws cards placed in stages and lanes, with a legend, the details of a card, a side panel for a stage and the notes of zones;panels = FALSEhides those three. It takeslayoutfrom the layouts the engine lists anddismiss = "no_outside"by default. Columns the engine has no field for stay in the widget’s R data and are not sent to it (#65).add_links()adds links between cards and the kinds of link; an empty data frame adds none (#65).add_zones()adds labelled outlines around groups of cards (#65).add_steps()adds steps to play through, with the changes each step makes to cards, and brings the step player (#65).add_variants()adds the variants a reader switches between (#65).stage_map()takes its table ascards, andcode_linesmarks the lines of a stage’s or step’s code;mapis the first argument ofadd_links(),add_zones(),add_steps()andadd_variants()(#67).stagesandlanescan be left out: they are taken from the cards’stageandlanecolumns.layout,motion,legend,cell_columnsandbundle_linkshave real defaults and no longer takeNULL; a blank status label is refused (#67).Ids that do not join (a card’s stage or lane, a link’s cards, kind, step or variants, a card’s zone, a step’s stage,
target,variant) and an id given twice in a table stop with an error of classstagemap_error_datathat names the ids, when the second table arrives, in either order. The id checks ofchangesinadd_steps()use the same class (#67).add_variants(), the"levels"and"dates"layouts,targetandvariantare marked experimental, with a badge in the help pages (#67).sm_trace()traces upstream, downstream or both walks from one or more start cards (withdirection,kindsandmax_distance), returning a plain data frame withdirection,distance,throughandkind(#71).sm_orphans()andsm_missing()list unlinked cards and cards ofstagewith no direct link tolinked_to(filtered bykinds), returning plain data frames; unknown ids, stages and kinds stop withstagemap_error_id(#71).stage_map_output(),render_stage_map()andstage_map_proxy()put a map in a Shiny app. The server readsinput$<id>_selected(the selected card ids),input$<id>_pick(the reader’s last pick),input$<id>_state(what the map holds) and, experimental,input$<id>_hovered(#72).Six verbs change a map that is already drawn:
stage_map_select(),stage_map_highlight(), and, experimental,stage_map_show(),stage_map_hide(),stage_map_enable()andstage_map_disable().stage_map_highlight()also takes astage_map()widget and lights cards from the first draw;stage_map()has nohighlightargument (#72).A render function given a promise of a map draws it once the promise resolves (#72).
stage_map_output()refusesNULLforwidthandheight, as its help says. The help ofstage_map_output()says which inputs areNULLbefore the map is drawn or the reader has picked,stage_map()says what a missing status label does, and the help says what a new map keeps of the hidden, disabled, lit and selected cards. The README and the Shiny demo app describe the exported functions (#77).One rule for ids everywhere: an id is text that is not blank, or a whole number of any size. An empty or blank id in a table stops with
stagemap_error_datathat names it, andtarget,variant,sm_trace(),sm_missing()and the Shiny verbs take whole numbers beyond the largest integer, as the tables do.stage_map_highlight(links =)checkskindlike the other ids. The help fordismisssays it applies to a picked card or stage, and the help forstage_map_output()says thekindofinput$<id>_pickand the fields ofinput$<id>_statemay grow (#75).In the Shiny demo app, the action and trace buttons use the cards picked on the map when the list is empty, or show a “Choose cards first” note when both are empty. On a narrow screen, the map appears before the controls (#79).
The README and a “Get started” article say why the package exists and show a first map with the trace functions, using a made-up traceability example (#79).
stage_map_studio(), experimental, opens a map in a ‘Shiny’ app and changes it through forms. Clicking a card, a stage, a lane or a link opens its form; a journal lists the changes with Undo. The Map room sets the layout, the cards per cell, bundled links and the legend; Ask runssm_trace(),sm_orphans()andsm_missing()and lights the answer on the map; Check shows what stopsstage_map(), with the fixes it offers; R code shows the code with the changed lines marked, Copy (also when clicked before the server has answered), a.Rdownload and a CSV download for each table. Done returns the map, and closing the page without it returnsNULL.run = FALSEreturns the app (#88, #90, #96).The studio opens on a built-in example map with a broken link when
mapisNULL, with a start card to choose between the example and a one-card map, and a guide, Try it, that lists six steps and ticks each one when it is done (#90, #96).The studio can be used with the keyboard alone, with a skip link, a visible focus ring and Escape closing the layer on top, and on a phone-sized screen with a dock of four buttons and one sheet at a time (#96).
stage_map_tables()gives back the tables a map was built from, as a named list of data frames with every column (#87).stage_map_code()writes the R code that builds a map again: the tables asdata.frame()calls, then the pipeline, with only the arguments that differ from their defaults (#87).With
run = TRUE, the studio keeps its work when its page reloads or its connection drops: the new page shows the document, the journal and the answer of Ask again. An app fromrun = FALSEstarts every session from the map it was given and, after a dropped connection, says that the studio started again. On a hosted copy a visitor’s Done ends the app for every visitor, and a hosted copy is not what the studio is made for yet (#112).The studio refuses a map whose table has a column named
.studio_uidwhenstage_map_studio()is called, a Distance in Ask that is not a whole number up to 2147483647 as an answer, and an event with repeated or blank names in its data with a notice. Ask puts the map back to the highlight ofstage_map_highlight()when it clears its answer, and the Check room’s nearest-id suggestion skips ids of more than 200 characters (#112).stage_map_code()and the studio’s code write the Unicode bidirectional controls in labels as\uescapes, so the code parses in a UTF-8 locale (#112).