Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ronplanken
Copy link

What's Changed

New Features:

  • Workspace Ordering: Add workspaceOrder property to panels to control workspace display order in the dashboard
  • Graphics Metadata: Add optional name and description fields to graphics for better identification
  • Graphics Grouping: Add group and order properties to organize graphics into collapsible groups
  • Comprehensive Tests: Added test coverage for all new features

Configuration Examples

Workspace Ordering:

"dashboardPanels": [{
"name": "myPanel",
"workspace": "setup",
"workspaceOrder": 1 // Lower numbers appear first
}]

Graphics Organization:

"graphics": [{
"file": "overlay.html",
"width": 1920,
"height": 1080,
"name": "Main Overlay", // Custom display name
"description": "Primary stream overlay", // Shows in collapsible section
"group": "Stream Assets", // Groups graphics together
"order": 1 // Sort within group
}]

Behavior

Workspaces

  • Default workspace always appears first
  • Workspaces with workspaceOrder appear before those without (sorted by order value)
  • Workspaces without order sort alphabetically (including fullbleed panels)

Graphics

  • Graphics within groups sort by order then alphabetically
  • All properties are optional and backward compatible

Screenshots

afbeelding

Image showing the new ordering

afbeelding

Image showing the new graphics options

@Hoishin Hoishin self-assigned this Sep 21, 2025
Comment on lines +178 to +201
// Sort workspaces by order first, then alphabetically
workspaces.sort((a, b) => {
const orderA = workspaceOrders.get(a.name);
const orderB = workspaceOrders.get(b.name);

// Both have orders: sort by order, then alphabetically if same order
if (orderA !== undefined && orderB !== undefined) {
if (orderA !== orderB) {
return orderA - orderB;
}
// Same order: fall through to alphabetical sorting
}
// Only A has order: A comes first
else if (orderA !== undefined) {
return -1;
}
// Only B has order: B comes first
else if (orderB !== undefined) {
return 1;
}

// Both have same order or neither has order: sort alphabetically
return a.label.localeCompare(b.label);
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sometimes there are use cases where you want to put a certain workspace or fullbleed panel to the last. we can do that by naming it like X-Misc-DoNotTouch or something and be sorted alphabetically. I wonder if it can be more explicitly configurable with this order system. It doesn't have to be implemented in this PR but would be nice to have the design that is extendable.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking the other day that we can use negative number to put certain panel in the back, same way how arrays are referenced with negative index in many languages (except JavaScript 😛, but now we have arr.at(-1) at least)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be just a bit more logic to sort correctly

@Hoishin
Copy link
Member

Hoishin commented Sep 21, 2025

Would it also be possible to make a separate PR on https://github.com/nodecg/docs to write the new options?

@EwanLyon
Copy link
Contributor

I believe I covered the new additions, feel free to double check though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants