@dosgato/templating 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -211,35 +211,58 @@ export interface TracingInterface {
211
211
  event?: (name: string, details: any, env?: TracingEnvironment) => void;
212
212
  }
213
213
  export interface BaseEvent {
214
- /** The larger UI area the user is interacting with that the event is emitted from.
215
- * @example 'ActionPanel', 'PageEditor', 'ComponentDialog' */
214
+ /**
215
+ * The name of the UI component that is recording the event. This should help you track
216
+ * down where the event is being logged in the code.
217
+ *
218
+ * @example 'ActionPanel', 'PageEditor', 'ComponentDialog'
219
+ */
216
220
  eventType: string;
217
221
  /** The specific action the user took. Typically the label for the element that emits
218
222
  * the event.
219
223
  * @example 'Add Page', 'Edit Page', 'Preview', 'Cancel Preview' */
220
224
  action: string;
221
225
  /** Additional data points specific to a particular event type's context. These should
222
- * be significant enough to understanding the event to merrit adding additional columns
226
+ * be significant enough to understanding the event to merit adding additional columns
223
227
  * in tools like elastic-search.
224
- * @warning This is NOT a catch-all property.
228
+ * @warning This is NOT a catch-all property. It should be used for metrics an analytics
229
+ * report would be likely to filter or group by.
225
230
  * @example { hiddenLabel: action.hiddenLabel } // The aria label for an action element. */
226
231
  additionalProperties?: Record<string, string | undefined>;
227
232
  }
228
- /** Events triggered by user interactions with interface elements in DosGato. This interface
229
- * is intended to provide a common model for succinctly expressing the contextually important
230
- * properties of these events to loggers that can be pointed to analytics and metrics services. */
233
+ /** Common model for user interaction events in DosGato, designed to capture contextually
234
+ * important properties for analytics and metrics logging and create enough shared structure
235
+ * to make it easy to generate meaningful reports and insights. */
231
236
  export interface UserEvent extends BaseEvent {
232
- /** The page, screen, or dialog the user is looking at in which the associated event emitter is
233
- * in context to.
234
- * @example '/pages', '/pages/[id]', '/pages/[id]/dialog' */
237
+ /**
238
+ * The sveltekit route the user is looking at when the event is triggered.
239
+ *
240
+ * Some dialogs will add the dialog name after a '#' for extra context, but this behavior is
241
+ * deprecated.
242
+ * @example '/pages', '/pages/[id]', '/pages/[id]#dialog' (deprecated) */
235
243
  screen: string;
236
- /** The target the emitted event is to trigger actions on.
237
- * Each page/screen, or dialog, needs to set their target for what events in it are targeted
238
- * to act on in in its context.
244
+ /**
245
+ * Identify a section of the screen to help identify what the user was looking at when
246
+ * taking the action. Very useful for tabs that do not have their own sveltekit routes.
247
+ *
248
+ * Also, if interacting inside a modal dialog that has a title,
249
+ * the title of the dialog could go here.
250
+ *
251
+ * Do not duplicate eventType here.
252
+ */
253
+ section?: string;
254
+ /**
255
+ * The target of the action reported in the `action` property.
256
+ *
257
+ * Each component that logs an event should consider the best value to place here. It's best
258
+ * if it's human-readable (avoid numeric and UUIDs), specific enough to understand what the user
259
+ * was doing, but not so unique that an analytics search would never filter or group on it.
239
260
  *
240
- * For example: The page in the page tree of the Pages screen that ActionPanel actions,
241
- * such as edit or preview, will act on.
242
- * @example '/site3-sandbox/about' */
261
+ * For example: When moving a page, the path of the page being moved. When moving many pages, the
262
+ * path of the page being moved into. When adding a component to a page, the templateKey of the
263
+ * component being added.
264
+ * @example '/site3-sandbox/about', 'hero-banner'
265
+ * */
243
266
  target: string;
244
267
  }
245
268
  interface AssetMetaDisplay {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dosgato/templating",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "A library to support building templates for dosgato CMS.",
5
5
  "type": "module",
6
6
  "exports": {