-
Notifications
You must be signed in to change notification settings - Fork 347
feat: Add ability to disable data sources #1567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 15ed071 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@alok87 is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
packages/api/CHANGELOG.md
Outdated
|
|
||
| ### Patch Changes | ||
|
|
||
| - feat: Add ability to disable data sources (fixes #1545) - Added 'disabled' field to Source model for toggling source visibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: we should run yarn changeset and revert changes to CHANGELOG.md as this file is generated at release time
| </Group> | ||
| </Group> | ||
| </Text> | ||
| <div style={{ flex: 1 }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elizabetdev can you provide UX feedback here? My gut tells me this feature won't be one of the main things people are doing it, so we should move it inside the form itself (see screenshots):
Example of where to put disabled potentially

Closed UI (toggle could be removed and add "Disabled" badge to details row?)

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alok87 functionality wise, things look good. pending @elizabetdev's feedback we could simplify some form code, lets see what she says :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alok87 The enabled/disabled toggle placement looks good to me 👍 Since it’s a high-level state, I agree it shouldn’t be buried under “Optional Fields.”
For the disabled state in the list view, the reduced opacity works well to show the status. One small thing to watch out for is the expand or collapse arrow (chevron). It would be good to keep that at full opacity.
If the arrow dims along with the text, the row can feel unclickable or read-only. Keeping the arrow bright helps signal that the row is still interactive and can be opened to update settings or re-enable it.
8c0e4d4 to
a2e1e18
Compare
- Add 'disabled' field to source schema (common-utils, api, app) - Move enable/disable toggle to expanded form header (top right) - Dim disabled sources in list view (50% opacity when closed) - Show full opacity when form is open for editing - Filter out disabled sources in search page, dashboards, sessions - Add changeset for release management - Smooth transition effects for visual feedback Based on PR feedback, form simplification will be addressed separately.
a2e1e18 to
15ed071
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const { data: connections } = useConnections(); | ||
| const updateSourceMutation = useUpdateSource(); | ||
|
|
||
| const handleDisabledToggle = useCallback( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on removing this code and just allowing the form to manage updating this value on save?


Summary
Fixes #1545
This PR implements the ability to enable/disable data sources from the UI. Disabled sources remain visible in the Sources management page but are automatically hidden from all dropdowns and selection menus throughout the application.
Changes
Backend
disabledfield to the Source model (MongoDB schema)BooleanfalseFrontend - Schema & Types
SourceBaseSchemaincommon-utilsto include optionaldisabledfieldFrontend - UI Components
Sources Management Page
Source Filtering
Updated all source selection dropdowns to filter out disabled sources:
User Experience
When a source is disabled:
When a source is enabled:
Use Cases
This feature enables teams to:
Testing
Manually tested:
Backward Compatibility
disabledfield are treated as enabledChangelog
Updated changelogs for all affected packages:
@hyperdx/app- UI components and filtering logic@hyperdx/api- Backend model changes@hyperdx/common-utils- Schema updates