Bistard / nota

📕Next-Gen AI-powered markdown note-taking application.
MIT License
59 stars 5 forks source link

Dev mac bar #245

Closed AAsteria closed 2 weeks ago

AAsteria commented 2 weeks ago

Pull Request Template

Description

Summary:

Issue(s) Addressed:

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:

Reviewers Checklist:

Additional Context (Optional)

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

Summary by Sourcery

Enhancements:

sourcery-ai[bot] commented 2 weeks ago

Reviewer's Guide by Sourcery

This PR implements UI improvements for the Mac window bar, focusing on proper zoom handling and layout adjustments. The changes include repositioning the window controls, adding zoom level support, and refactoring the component initialization process.

Class diagram for BrowserZoomService changes

classDiagram
    class BrowserZoomService {
        - _level: number
        - _ignored: HTMLElement[]
        + markAsIgnored(element: HTMLElement): IDisposable
        + setZoomLevel(level: number): void
        - __zoomLevelToZoomFactor(level: number): number
        + __applyStyleToElement(element: HTMLElement, level: number): void
    }

Class diagram for MacWindowBar changes

classDiagram
    class MacWindowBar {
        - hostService: IHostService
        - lifecycleService: IBrowserLifecycleService
        - browserZoomService: IBrowserZoomService
        + create(parent: HTMLElement): void
    }

Class diagram for QuickAccessBar changes

classDiagram
    class QuickAccessBar {
        - themeService: IThemeService
        - componentService: IComponentService
        - logService: ILogService
        - _macWindowBar: MacWindowBar
        + _createContent(): void
    }

File-Level Changes

Change Details Files
Refactored Mac window bar styling and positioning
  • Added fixed positioning for the window bar container
  • Updated margins and spacing for better alignment
  • Restructured SCSS nesting for better organization
  • Adjusted positioning of window control buttons
src/workbench/parts/navigationPanel/navigationBar/quickAccessBar/media/macWindowBar.scss
Enhanced zoom handling in the BrowserZoomService
  • Added new method to apply zoom styles to elements
  • Implemented immediate zoom level application for ignored elements
  • Refactored zoom level application logic for better reusability
src/workbench/services/zoom/zoomService.ts
Updated MacWindowBar component initialization and zoom handling
  • Added BrowserZoomService dependency injection
  • Implemented zoom level ignoring for window controls
  • Removed automatic content creation in constructor
  • Modified component creation flow
src/workbench/parts/navigationPanel/navigationBar/quickAccessBar/macWindowBar.ts
Improved QuickAccessBar layout and initialization
  • Added flex layout for better component alignment
  • Updated spacing and positioning of search bar
  • Modified component initialization flow
src/workbench/parts/navigationPanel/navigationBar/quickAccessBar/media/quickAccessBar.scss
src/workbench/parts/navigationPanel/navigationBar/quickAccessBar/quickAccessBar.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](https://app.sourcery.ai) 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 - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).