Tell us what works and what could be better. We read every submission.
@andrew-psch·7 public vizzes
This example demonstrates a top navigation bar for a case management interface, configured entirely through a JSON object with left and right button groups. The JSON defines properties like icons, labels, intents, routes, and styling for each button, including dividers and anchor buttons. It showcases the xlabs-navigation component’s declarative UX configuration, using the React-based library’s button and anchor-button types to render navigation options such as Home, Page ONE, and Page TWO. The code explicitly specifies icons like "data-connection" and "cube", with routes pointing to internal pages or external links.
This example demonstrates a minimal HTTP POST request sent from a browser to a remote server, using the Fetch API to transmit JSON-encoded data. The code posts to the endpoint `https://hub11.dev-labs.io` with a body containing a `channel` field set to `"alfa"` and a `data` field with the string `"Hello world!"`. It shows how to construct a structured payload with `JSON.stringify` and send it asynchronously, though it does not include any response handling or visualization. The example relies solely on the native `fetch` method, with no external libraries or rendering components.
This example demonstrates how to send a message to a hub using a simple curl command in a shell script. It shows a single HTTP POST request that transmits a JSON payload containing a channel identifier and a “Hello world!” message to the specified endpoint. The script relies on the curl command-line tool, which handles the request, and explicitly sets the data format and HTTP method. The example is straightforward, illustrating the minimal syntax required to post structured data to a remote server without any additional libraries or visualization components.
This example visualizes the structure of a buzzPost message as a JSON payload, showing the `channel` and `data` fields that define where and what to post. The code uses a simple object literal in `payload.js` to represent the message format, with inline comments clarifying each property’s role. Rendering is minimal, relying on JavaScript’s native `JSON.stringify` to display the payload in a readable, annotated form. The visualization emphasizes the key-value pair organization of the message, making the data contract explicit for developers integrating with the buzzPost API.
This example demonstrates a minimal event-listener setup that subscribes to a live message stream and logs each incoming event to the browser console. It shows how a single JavaScript file can establish a real-time connection to a remote hub using the native EventSource API, which handles the server-sent events protocol. The code defines a fixed channel list—alfa, bravo, and charlie—via the URL string, then attaches an `onmessage` handler to print every message object as it arrives. No visualization or data transformation occurs; the focus is purely on the listening and logging mechanism.
This example tracks user activity in ServiceNow’s native UI by sending Google Analytics pageviews whenever the parent page’s title changes. The code uses the Google Analytics tracking snippet (`ga('create', …)` and `ga('send', …)`) and a `MutationObserver` to watch the `window.top.document.querySelector("title")` element for attribute, character data, or child list changes. On each mutation, it fires a pageview hit with the updated title and current `location.href`. The approach relies on the browser’s native MutationObserver API rather than a custom event system.
This example demonstrates how to send ServiceNow page interactions to Google Analytics for tracking. It uses the standard Google Analytics tracking snippet, creating a pageview hit that captures the top-level document title and the current URL location. The code relies on the `ga` function from the Google Analytics JavaScript library, with the `create` command initializing a tracker and the `send` command transmitting the pageview data. The script runs in the browser, reading `window.top.document.title` and `window.location.href` to report activity from within the ServiceNow environment.