Skip to content

fix dropdown bug #541

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

Merged
merged 3 commits into from
Jun 2, 2025
Merged

fix dropdown bug #541

merged 3 commits into from
Jun 2, 2025

Conversation

tru-kilo
Copy link
Contributor

Context

Fixes #465

-->

Screenshots

Before
Screenshot 2025-05-28 at 6 01 24 PM

After
Screenshot 2025-05-28 at 6 04 30 PM

Copy link

changeset-bot bot commented May 28, 2025

🦋 Changeset detected

Latest commit: 5fb89c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

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

@tru-kilo tru-kilo requested a review from kevinvandijk May 28, 2025 23:30
Copy link
Collaborator

@kevinvandijk kevinvandijk left a comment

Choose a reason for hiding this comment

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

Feels like a lot of changes to fix a simple thing? Can you try my suggestion on the original code? The less changes the better considering we want to stay compatible with upstream

</div>

{/* Dropdown items - Use windowing for large lists */}
<div className="max-h-[300px] overflow-y-auto">
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a gut feeling, didn't try it but would removing only the overflow-y-auto class here solve not the issue as well, without the need for all the other changes being done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it doesn't work, unless you want the search bar to also scroll within the container? I'll try and clean it up, it wasn't a lot of changes but the diff makes it look like it is, I just had to remove a wrapped div

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah ok, clear! The div looked huge but makes sense then indeed! Can you drop a comment somewhere near it with a kilocode_change marker that says that it was removed intentionally?

Copy link
Collaborator

Choose a reason for hiding this comment

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

When looking at it with whitespace ignored the diff doesn't look so big anymore :) In fact most of the changes below come from the reduced indentation causing Prettier to put things on the same line.

Screenshot 2025-06-03 at 09 54 34

Copy link
Contributor

Choose a reason for hiding this comment

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

prettier loves 🧌 -ing diffs, alas.

Copy link
Collaborator

@kevinvandijk kevinvandijk left a comment

Choose a reason for hiding this comment

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

Don't forget to add a changeset :)

@tru-kilo tru-kilo merged commit 6e14fce into main Jun 2, 2025
7 checks passed
@tru-kilo tru-kilo deleted the tru--dropdown-bug branch June 2, 2025 15:54
) : (
<div className="py-1">
{groupedOptions.map((option, index) => {
// Memoize rendering of each item type for better performance
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessarily removed comment

)
}

// Use stable keys for better reconciliation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unnecessarily removed comment

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.

Multiple Scrollbars
4 participants