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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switched from set() to update() #564

Merged
merged 8 commits into from
May 7, 2024
Merged

Conversation

kikoso
Copy link
Collaborator

@kikoso kikoso commented May 6, 2024

update() should be favoured over set(). From the documentation:

For example, use [update} when value is passed into the class constructor parameters.

This is likely impacting performance during recomposition.


Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #547 馃

@kikoso
Copy link
Collaborator Author

kikoso commented May 6, 2024

Added also contentDescription solving #566 and #532

@kikoso kikoso changed the title fix: switched from set() to update() fix!: switched from set() to update() May 6, 2024
@kikoso kikoso changed the title fix!: switched from set() to update() fix: switched from set() to update() May 7, 2024
Copy link
Contributor

@bubenheimer bubenheimer left a comment

Choose a reason for hiding this comment

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

Thanks for the updates. There are a few places left where state & contentDescription are still in a different order.

Also, are you still planning to deprecate the functions without contentDescription, possibly together with a tracking issue/PR? There are so many similar-looking functions in this file that it would be good not to permanently add even more.

Personally I'd just drop the old functions and make it a breaking change. It's trivial for users to change the calling params as needed.

@kikoso
Copy link
Collaborator Author

kikoso commented May 7, 2024

Thanks for the updates. There are a few places left where state & contentDescription are still in a different order.

Also, are you still planning to deprecate the functions without contentDescription, possibly together with a tracking issue/PR? There are so many similar-looking functions in this file that it would be good not to permanently add even more.

Personally I'd just drop the old functions and make it a breaking change. It's trivial for users to change the calling params as needed.

The constructors should have now all the parameters in order.

Regarding the breaking change: I would not like to release this as a standalone fix/feature and a breaking change. However, we can pack it together with #516 and/or #521, to minimize the amount of major releases, which are always painful.

@bubenheimer
Copy link
Contributor

bubenheimer commented May 7, 2024

Regarding the breaking change: I would not like to release this as a standalone fix/feature and a breaking change. However, we can pack it together with #516 and/or #521, to minimize the amount of major releases, which are always painful.

Sounds fine. Right now the changes are inconsistent. Marker() has a single changed version, while AdvancedMarker() and MarkerComposable() have one changed new and one unchanged version each.

@kikoso kikoso changed the title fix: switched from set() to update() fix!: switched from set() to update() May 7, 2024
@kikoso
Copy link
Collaborator Author

kikoso commented May 7, 2024

Regarding the breaking change: I would not like to release this as a standalone fix/feature and a breaking change. However, we can pack it together with #516 and/or #521, to minimize the amount of major releases, which are always painful.

Sounds fine. Right now the changes are inconsistent. Marker() has a single changed version, while AdvancedMarker() and MarkerComposable() have one changed new and one unchanged version each.

@bubenheimer , we will go with a breaking change, so a single constructor with contentDescription.

@kikoso kikoso changed the title fix!: switched from set() to update() chore!: switched from set() to update() May 7, 2024
@kikoso kikoso changed the title chore!: switched from set() to update() chore: switched from set() to update() May 7, 2024
Copy link
Contributor

@bubenheimer bubenheimer left a comment

Choose a reason for hiding this comment

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

Please revert 450d842 prior to merge, it was a bad commit.

@dkhawk dkhawk merged commit f89448b into main May 7, 2024
11 checks passed
@dkhawk dkhawk deleted the fix/switched_set_to_update branch May 7, 2024 16:56
@kikoso
Copy link
Collaborator Author

kikoso commented May 7, 2024

Please revert 450d842 prior to merge, it was a bad commit.

This was fixed before the merge, thanks!

@bubenheimer
Copy link
Contributor

Please revert 450d842 prior to merge, it was a bad commit.

This was fixed before the merge, thanks!

@kikoso @dkhawk On my end I see that 450d842 was indeed merged to main and introduced documentation problems.

@kikoso
Copy link
Collaborator Author

kikoso commented May 7, 2024

450d842

Fixed in #567

@googlemaps-bot
Copy link
Contributor

馃帀 This PR is included in version 4.4.3 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

@googlemaps-bot
Copy link
Contributor

馃帀 This PR is included in version 5.0.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

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.

fix: update set() to update() for a ComposeNode (map objects)
5 participants