Skip to content
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

Dev dashboard #253

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open

Dev dashboard #253

wants to merge 6 commits into from

Conversation

AAsteria
Copy link
Collaborator

@AAsteria AAsteria commented Dec 21, 2024

Pull Request Template

Description

Summary:

  • A brief summary of the purpose and context of this PR.

Issue(s) Addressed:

  • Reference to the issue(s) or feature(s) this PR addresses.

Changes

Type of Changes: Bug fix / new feature / breaking change / documentation

  1. Change 1: Describe in detail what was changed or added.
  2. Change 2: Elaborate on the reasons and any associated logic/decisions.
  3. ...

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Reviewers Checklist:

  • Code follows project guidelines and clean code principles
  • Tested on various resolutions and browsers
  • Unit tests have been updated or added, if necessary
  • Documentation has been updated

Additional Context (Optional)

Add any other context or screenshots about the pull request here.

Summary by Sourcery

New Features:

  • A new dashboard has been added to the workspace, which displays pinned notes, recent items, and new features.

@AAsteria AAsteria requested a review from Bistard as a code owner December 21, 2024 02:29
Copy link
Contributor

sourcery-ai bot commented Dec 21, 2024

Reviewer's Guide by Sourcery

This pull request introduces a new developer dashboard to the workbench. The dashboard displays pinned notes, recent items, and new features. It replaces the previous editor view in the workspace layout. The implementation includes new components and styling for the dashboard and its subviews.

Class diagram for the new Dashboard components

classDiagram
    class DashboardView {
        -subViews: DashboardSubView[]
        +createView(): HTMLElement
        #_createContent(): void
        #_registerListeners(): void
        -createWelcomeSection(title: string): HTMLElement
        -generatePlaceholderItems(sectionId: string): string[]
    }
    class DashboardSubView {
        -slider: DashboardSlider
        -opts: IDashboardViewOpts
        +render(): HTMLElement
        #_createContent(): void
        #_registerListeners(): void
        -__createSortDropdown(): HTMLElement
        -__createSubViewTitle(titleText: string): HTMLElement
        -createSliderItems(content: string[]): HTMLElement[]
    }
    class DashboardSlider {
        -items: HTMLElement[]
        +createView(): HTMLElement
        #_createContent(): void
        #_registerListeners(): void
    }
    class Component {
        <<abstract>>
    }

    DashboardView --|> Component
    DashboardSubView --|> Component
    DashboardSlider --|> Component
    DashboardView *-- DashboardSubView
    DashboardSubView *-- DashboardSlider

    note for DashboardView "Main container for the dashboard"
    note for DashboardSubView "Handles individual sections like Pinned Notes"
    note for DashboardSlider "Manages horizontal scrollable content"
Loading

File-Level Changes

Change Details Files
Introduced a new developer dashboard.
  • Created DashboardView, DashboardSubView, and DashboardSlider components.
  • Added new styles for the dashboard and its elements.
  • Replaced the editor view with the new dashboard in the workspace layout.
  • Added placeholder content for pinned notes, recent items, and new features sections.
  • Implemented smooth scrolling for the slider items in each section.
  • Added a welcome section with a "New Note" button.
  • Implemented a sorting dropdown in the section header (currently placeholder).
src/workbench/parts/workspace/workspace.ts
src/workbench/services/dashboard/dashboardView.ts
src/workbench/services/dashboard/media/dashboard.scss
src/workbench/services/dashboard/dashboardSubView.ts
src/workbench/services/dashboard/dashboardSlider.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @AAsteria - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Remove commented out code for the editor service instead of leaving it in place. If it needs to be referenced later, it can be found in version control history.
  • Consider adding error handling for cases where dashboard content fails to load or is invalid.
Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

2 participants