Repository navigation
v1.3.0
Where the user is, told by the router and the page. A router adapter takes route and
screen from React Router or Vue Router's own patterns and names, so a redirect on first
load is one breadcrumb and a :param route is one page. data-fsl-view marks name the
tabs, steps and dialogs on screen, and every entry carries them as a view label. And
/testing lets an app assert what it logs, with the real entries the logger sends.
Added
labelsForanddefaultLabelsForon/client/navigation: one function names a page'sroute,screenandpath, and its answer is used exactly as returned. It replacesrouteFor,cleanPathandpath: false.navigatedTo(screen, { route?, path? })for apps whose screens change without the URL changing — the same breadcrumb and labels as automatic navigation.bc.handledError— the clearer name for an error your code handled and did not log./testing:captureEntries()keeps every entry the logger sends, for your own tests, andresetSession()starts each test with an empty trail and a full budget.fsl doctorwarnslogs-inside-functions-sourcewhen local log files sit inside the Functions source folder.- Views:
enableViews()from/client/views, anddata-fsl-view="name"in your markup. Every browser entry carries aviewlabel naming the marked tabs, steps and dialogs visible when it was written, joined with›. - Router adapters:
enableVueRouterNavigation(router)from/client/navigation/vue-routerandenableReactRouterNavigation(router)from/client/navigation/react-router. They takerouteandscreenfrom the router's own patterns and names instead of guessing from the path. One option,adjust, edits the labels. Neither router is a dependency.
Changed
- One structured
navbreadcrumb per page change:nameis the screen (or the route),dataholdsrouteandpath. In 1.1–1.2 the name was the path. With navigation on,bc.navandsetScreenno longer add a second breadcrumb for the same change. - With navigation on, the
screenlabel comes from navigation, notsetScreen. An app that called both now sees navigation's screen on every entry, and repeat counting groups errors by that screen too.
Fixed
- React Router: a redirect on first load records one breadcrumb, for the page it ends on. It recorded the starting page too.
- The README's local log folder is now
.fsl-logs/at the repo root. Insidefunctions/, every entry restarted the emulator, which rotated the file and deleted entries within seconds.
Deprecated
enableNavigation({ routeFor }),({ cleanPath }),({ path: false })→labelsFor; therouteSourcelabel;bc.navandsetScreen→ navigation ornavigatedTo;bc.error→bc.handledError. Each warns once where code can, and is removed in 2.0 (#56).