-
Notifications
You must be signed in to change notification settings - Fork 77
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
Refactor: Audit custom event payload for consistency #2925
Labels
4 - verified
Issues that have been released and confirmed resolved.
refactor
Issues tied to code that needs to be significantly reworked.
Milestone
Comments
jcfranco
added
refactor
Issues tied to code that needs to be significantly reworked.
0 - new
New issues that need assignment.
needs triage
Planning workflow - pending design/dev review.
labels
Aug 27, 2021
benelan
added
1 - assigned
Issues that are assigned to a sprint and a team member.
and removed
0 - new
New issues that need assignment.
needs triage
Planning workflow - pending design/dev review.
labels
Aug 27, 2021
benelan
added
0 - new
New issues that need assignment.
and removed
1 - assigned
Issues that are assigned to a sprint and a team member.
labels
Mar 23, 2022
jcfranco
added
1 - assigned
Issues that are assigned to a sprint and a team member.
and removed
0 - new
New issues that need assignment.
labels
Jun 1, 2022
github-actions
bot
modified the milestones:
Sprint 06/06 - 06/17,
Sprint 06/20 - 06/24,
Sprint 06/27 - 07/08
Jun 20, 2022
jcfranco
removed
the
1 - assigned
Issues that are assigned to a sprint and a team member.
label
Jul 27, 2022
github-actions
bot
modified the milestones:
Sprint 2022/09/05 - 2022/09/16,
Sprint 2022/09/19 - 2022/09/30
Sep 19, 2022
github-actions
bot
modified the milestones:
Sprint 2022/09/19 - 2022/09/30,
Sprint 2022/10/03 - 2022/10/14
Oct 3, 2022
benelan
modified the milestones:
Sprint 2022/10/03 - 2022/10/07,
Sprint 2022/10/10 - 2022/10/21
Oct 11, 2022
github-actions
bot
modified the milestones:
Sprint 2022/10/10 - 2022/10/21,
Sprint 2022/10/24 - 2022/11/04
Oct 24, 2022
github-actions
bot
modified the milestones:
Sprint 2022/10/24 - 2022/11/04,
Sprint 2022/11/07 - 2022/11/18
Nov 7, 2022
github-actions
bot
modified the milestones:
Sprint 2022/11/07 - 2022/11/18,
Sprint 2022/11/20 - 2022/12/01
Nov 21, 2022
geospatialem
modified the milestones:
Sprint 2022/11/20 - 2022/12/01,
2023 January Priorities
Nov 23, 2022
Here are some events I found that could deprecate their event payload or clean it up to be consistent.
Some of them may require introducing a public property in order to remove the event payload. @geospatialem should we make this a list for us to divvy up the work? |
15 tasks
This one should be good now. |
driskull
added
3 - installed
Issues that have been merged to master branch and are ready for final confirmation.
and removed
2 - in development
Issues that are actively being worked on.
labels
Dec 15, 2022
Installed and assigned for verification. |
geospatialem
added
4 - verified
Issues that have been released and confirmed resolved.
and removed
3 - installed
Issues that have been merged to master branch and are ready for final confirmation.
labels
Jan 16, 2023
Verification
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
4 - verified
Issues that have been released and confirmed resolved.
refactor
Issues tied to code that needs to be significantly reworked.
Summary
We have inconsistencies when it comes to emitting custom events:
this.calciteFoo.emit({ foo: "foo" })
this.calciteFoo.emit("foo")
EventEmitter
is not typed consistentlycalciteFoo: EventEmitter<FooDataObject>;
calciteFoo: EventEmitter
For 1, we should emit an object for future-proofing, regardless of how many props are included.
For 2, we should always provide a type on
EventEmitter
.void
should be used if there is no event payload. We can even add an ESLint rule to catch this.Additionally, our conventions should be updated with this information and to also review whether it makes sense to introduce a prop instead of being part of an event's payload (to avoid cases where a prop from the event's detail ends up being a prop in the future and therefore redundant).
cc @benelan @samMatenaer
Additional resources
#2854
#2858
#3163
The text was updated successfully, but these errors were encountered: