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

Bugfix/#2867 Fixes popup disappearing in Input Autocompete #2937

Merged
merged 8 commits into from
Dec 17, 2024

Conversation

nullpointerexceptionkek
Copy link
Contributor

Linked Issue

Closes #2867

Description

Fixes by checking if the current selection contains a text.

Changsets

Instructions: Changesets automate our changelog. If you modify files in /packages, run pnpm changeset in the root of the monorepo, follow the prompts, then commit the markdown file. Changes that add features should be minor while chores and bugfixes should be patch. Please prefix the changeset message with feat:, bugfix: or chore:.

Checklist

Please read and apply all contribution requirements.

  • This PR targets the dev branch (NEVER master)
  • Documentation reflects all relevant changes
  • Branch is prefixed with: docs/, feat/, chore/, bugfix/
  • Ensure Svelte and Typescript linting is current - run pnpm ci:check
  • Ensure Prettier linting is current - run pnpm format
  • All test cases are passing - run pnpm test
  • Includes a changeset (if relevant; see above)

Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: ec52309

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

This PR includes changesets to release 1 package
Name Type
@skeletonlabs/skeleton 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

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
skeleton-docs ✅ Ready (Inspect) Visit Preview Dec 17, 2024 8:14pm

Copy link

vercel bot commented Nov 8, 2024

@nullpointerexceptionkek is attempting to deploy a commit to the Skeleton Labs Team on Vercel.

A member of the Team first needs to authorize it.

@nullpointerexceptionkek
Copy link
Contributor Author

nullpointerexceptionkek commented Nov 8, 2024

Werid, the test works on my machine

image
image

@nullpointerexceptionkek nullpointerexceptionkek marked this pull request as ready for review November 8, 2024 19:29
@endigo9740
Copy link
Contributor

endigo9740 commented Nov 8, 2024

@nullpointerexceptionkek we typically don't accept drive-by PRs like this. We rather folks discuss the changes upfront to verify they are changes we would accept. In this case, we have instituted a feature freeze on the v2 Popover feature.

I'll leave this for now to consider it, but cannot promise it'll move forward.

Also, if you would please ahead remove the issue #XXXX from the changeset. Changesets append this automatically, so this is redundant.

@nullpointerexceptionkek
Copy link
Contributor Author

@nullpointerexceptionkek we typically don't accept drive-by PRs like this. We rather folks discuss the changes upfront to verify they are changes we would accept. In this case, we have instituted a feature freeze on the v2 Popover feature.

I'll leave this for now to consider it, but cannot promise it'll move forward.

Also, if you would please ahead remove the issue #XXXX from the changeset. Changesets append this automatically, so this is redundant.

Yes, I will make an update on this.

So the typical procedure is to discuss in the issue thread?

@endigo9740
Copy link
Contributor

So the typical procedure is to discuss in the issue thread?

Or Discord, etc. Anything so we can ensure folks aren't wasting time on updates we won't accept! We're trying to help in that regard. This is covered in our contribution requirements:

https://www.skeleton.dev/docs/contributing/requirements#pull-requests

Given it's a small change I may allow it this once, but it'll be lower priority for now.

@endigo9740
Copy link
Contributor

endigo9740 commented Dec 16, 2024

@nullpointerexceptionkek I'd hoped to review this sooner, but unfortunately the team and I have been swamped with preparing for the upcoming Skeleton v3 release candidate this week. The RC will be the final pre-release version of Skeleton v3 before it merges into the mainline branch.

As such, v2 will then enter into an archived state. So I would like to get this PR finalized. The changes as implement in the PR look fine, but I've noted we're seeing a failing unit test as part of the CI checks:

Screenshot 2024-12-16 at 2 54 14 PM

While I don't believe this to be directly related to you change, I wanted to ask two things:

  1. If you could please merge the latest dev branch changes into your PR to ensure it's fully up to date and able to be merged. In fact, the issue above may have already been resolved.
  2. If the test is not resolved, would you consider taking a look at it. Even if that means commenting out the offending test or line.

I'd very much like to get your change in before we archive v2. So this is probably the last opportunity to do so. If you can't do this, then we may have forego this one. Thankfully Popovers are implemented in a different manner in v3, so the issue should not carry forward.

No pressure, but the next release will be two days from now (Wednesday). If I don't hear from you by then then I will go ahead and close this out.

But again, I'd very much appreciate the help!

@nullpointerexceptionkek
Copy link
Contributor Author

Hi,
I been busy with finals recently, I will have time to check this PR in the next 2 days or so.

Very happy to hear the upcoming release for v3

@nullpointerexceptionkek
Copy link
Contributor Author

nullpointerexceptionkek commented Dec 17, 2024

It should be good,
I increased the delay before running the test, which seems to fix it.

@endigo9740
Copy link
Contributor

@nullpointerexceptionkek everything is green so that works for me.

This will be included as part of tomorrow's v2 release. In fact this may even be one of the last public contributions! Thanks again for the quick turn around!

@endigo9740 endigo9740 merged commit 74505a6 into skeletonlabs:dev Dec 17, 2024
4 of 6 checks passed
@nullpointerexceptionkek
Copy link
Contributor Author

Do you want me to close this one as well? it is a 1 line fix with a important CSS style

#2943

@endigo9740
Copy link
Contributor

I got it, thanks!

Comment on lines +140 to +142
function handleMouseUp(event: MouseEvent) {
if (!triggerNode.contains(event.target as Node)) close();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

@endigo9740 After a bit of digging, I think this is the root cause for #3075.

Copy link
Contributor

Choose a reason for hiding this comment

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

@phamduylong I see. Well I'd welcome a fix if possible. We're only due for about 1 more release of v2 before we archived it, but I'm certain I'm not going to have time to address this directly.

Copy link
Contributor

Choose a reason for hiding this comment

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

@nullpointerexceptionkek FYI as well in case you guys want to talk through this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll take a look at it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The function handleMouseUp is a fix, or else when the user have an popup open and copies a text outside by dragging the mouse, the popup will not be closed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have PR the changes @phamduylong

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.

Autocompletion popup disappears with mouseup event outside of input field
3 participants