Skip to content

Refactor UI Code

ryanlong requested to merge sidebar_improvements into main

Created by: deepakduggirala

Description

Enhance active item styling and scroll behavior

  • Scroll sidebar to keep the selected item in the view
    • Improves UX by ensuring the selected item remains visible without manual scrolling.
    • Enhances consistency with common UI patterns.
  • Do not select parent item when a child item is selected.
    • Prevents confusion by reflecting the user’s actual intent.
    • Aligns with common UI behavior for better consistency.

Simplify isFeatureEnabled

previous:

import { isFeatureEnabled } from "@/services/utils";
import { useAuthStore } from "@/stores/auth";
const auth = useAuthStore();
isFeatureEnabled({
  featureKey: 'genomeBrowser',
  hasRole: auth.hasRole,
})

proposed:

import { useAuthStore } from "@/stores/auth";
const auth = useAuthStore();
auth.isFeatureEnabled('genomeBrowser')

Changes Made

Sidebar component

  • Feature added
  • Bug fixed
  • Code refactored
  • Tests changed
  • Documentation updated
  • Other changes: [describe]

Screenshots (if applicable) Mar-12-2025 18-26-39

Checklist

Before submitting this PR, please make sure that:

  • Your code passes linting and coding style checks.
  • Documentation has been updated to reflect the changes.
  • You have reviewed your own code and resolved any merge conflicts.
  • You have requested a review from at least one team member.
  • Any relevant issue(s) have been linked to this PR.

Merge request reports

Loading