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

fix: fix issue with widget not selecting place #196

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

adriansberg
Copy link
Contributor

The issue with the widget not selecting a place was due to the event listener on blur. The blur event was happening before the "combobox-commit" event which is the one that sets the place. A fix for this was to add event listener to the mousedown event instead of the click event in the combobox code. That was solved with a patch using patch-package. Also mentioned in this issue: github/combobox-nav#54

Also fixed an issue that showed "undefined" if selected place did not have a locality.

Copy link

vercel bot commented Jan 4, 2024

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

Name Status Preview Comments Updated (UTC)
planner-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 5, 2024 0:54am

@mortennordseth
Copy link
Contributor

From what I can see, this changes the current version of the widget (v2.6.0), but should probably be a new version? 🤔

@adriansberg
Copy link
Contributor Author

Yeah, maybe it should? Thought that since it was a fix and not any breaking changes that it could be the same version so that it is updated, but I might've misunderstood how we treat the widget version.

@adriansberg
Copy link
Contributor Author

I can update to 2.6.1

@mortennordseth
Copy link
Contributor

I can update to 2.6.1

It should be v2.8.0 I think, because this would be released with that version.

Version is based on package.json. We should always keep this in sync with the generated version in Releases so the changelog is correct.

@adriansberg
Copy link
Contributor Author

Ah, mega confused.

What decides that the next release is 2.8.0 and not 2.7.1? I'd guess the trip in map changes.


So. If I change the version in package.json to 2.8.0, run the script again then make a draft release that matches the version in package.json?

@mortennordseth
Copy link
Contributor

Yes, since we are releasing with a new feature (add functionality) it will be 2.8.0

That sounds correct to me 👍 And unstage the v2.6.0 changes

@adriansberg
Copy link
Contributor Author

As long as we know that we'll release added changes and not a bug fix before the changes that is.

@mortennordseth
Copy link
Contributor

Yep, that's something to consider. Maybe we shouldn't generate new widget versions for PRs like this and do it as a part of the release flow instead.

  1. Draft a new release
  2. Any changes to the widget? => generate a new widget version and push to main
  3. Release

The issue with the widget not selecting a place was due to the event listener on blur. The blur event was happening before the "combobox-commit" event which is the one that sets the place. A fix for this was to add event listener to the `mousedown` event instead of the `click` event in the combobox code. That was solved with a patch using `patch-package`. Also mentioned in this issue: github/combobox-nav#54

Also fixed an issue that showed "undefined" if selected place did not have a locality.
Copy link
Contributor

@mortennordseth mortennordseth left a comment

Choose a reason for hiding this comment

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

Perfect 🎉 We should probably update the README with the conclusion from this discussion, but that can be done in another PR :)

@adriansberg adriansberg merged commit 62d8b77 into main Jan 5, 2024
5 checks passed
@adriansberg adriansberg deleted the adriansberg/fix-widget-not-selecting branch January 5, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants