Skip to content

refactor(file-selector): css refactoring#4521

Open
DavideMininni-Fincons wants to merge 2 commits intomainfrom
refactor/file-selector
Open

refactor(file-selector): css refactoring#4521
DavideMininni-Fincons wants to merge 2 commits intomainfrom
refactor/file-selector

Conversation

@DavideMininni-Fincons
Copy link
Copy Markdown
Contributor

Before review, the issue related to different default for button size should be discussed and fixed, since the default sizes for the file-selector's internal button are m / s, while the button has by default l / s.

See also this thread: #4376 (comment)


Subtask of #3969

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @DavideMininni-Fincons, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refactors the CSS implementation for the file-selector component by centralizing its common styling variables into a dedicated global SCSS file. This change aims to improve maintainability and consistency across the component's styling. Additionally, the PR streamlines the component's rendering by removing an unnecessary HTML wrapper element. The author has noted a pending discussion regarding button sizes within the component, indicating further refinement may be needed.

Highlights

  • CSS Refactoring: Extracted common CSS variables for the file-selector component into a new global SCSS file for better organization and reusability.
  • DOM Structure Optimization: Removed a redundant wrapper div from the file-selector's render template, simplifying the component's DOM structure.
  • Snapshot Updates: Updated snapshot tests for both file-selector and file-selector-dropzone components to reflect the recent DOM and styling changes.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/elements/core/styles/core.scss
    • Imported the new file-selector.global SCSS file.
    • Included the file-selector.base mixin to apply global file-selector styles.
  • src/elements/file-selector/common/file-selector-common.scss
    • Removed several CSS variable definitions, which were moved to the new global SCSS file.
  • src/elements/file-selector/common/file-selector-common.ts
    • Removed an outer div element with class sbb-file-selector from the component's render method.
  • src/elements/file-selector/common/file-selector.global.scss
    • Added a new SCSS file to define common CSS variables and a base mixin for the file selector component.
  • src/elements/file-selector/file-selector-dropzone/snapshots/file-selector-dropzone.snapshot.spec.snap.js
    • Updated snapshot tests to reflect the changes in the component's Shadow DOM structure and new test cases for multiple file selection.
  • src/elements/file-selector/file-selector/snapshots/file-selector.snapshot.spec.snap.js
    • Updated snapshot tests to reflect the changes in the component's Shadow DOM structure.
Activity
  • The pull request is currently marked as 'Work In Progress' (WIP).
  • The author has highlighted an outstanding discussion point regarding default button sizes within the file-selector component, referencing a previous pull request for context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Code refactored, clean and bright, Old wrappers gone, new styles take flight. CSS variables, a global view, Making components fresh and new.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@DavideMininni-Fincons DavideMininni-Fincons mentioned this pull request Feb 20, 2026
82 tasks
@jeripeierSBB jeripeierSBB added the pr: blocked Pull request is blocked either for merging or reviewing label Mar 2, 2026
@DavideMininni-Fincons DavideMininni-Fincons changed the title refactor(file-selector): css refactoring [WIP] refactor(file-selector): css refactoring Mar 26, 2026
@github-actions github-actions bot added the pr: peer review required A peer review is required for this pull request label Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diff-available pr: blocked Pull request is blocked either for merging or reviewing pr: peer review required A peer review is required for this pull request pr: visual review required preview-available target: 4.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants