-
Notifications
You must be signed in to change notification settings - Fork 48
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
feat!: improve events emissions #1295
Conversation
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
…ing ones Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
WalkthroughThe changes involve a systematic renaming of event types and attributes across multiple files to enhance consistency and readability. This effort aims to standardize event naming conventions and improve the overall clarity of event-related code within the system. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1295 +/- ##
==========================================
- Coverage 81.04% 81.02% -0.02%
==========================================
Files 218 218
Lines 17880 17898 +18
==========================================
+ Hits 14490 14502 +12
- Misses 2778 2784 +6
Partials 612 612 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (38)
- types/utils/slices.go (1 hunks)
- x/posts/abci.go (2 hunks)
- x/posts/keeper/msg_server.go (12 hunks)
- x/posts/keeper/msg_server_test.go (15 hunks)
- x/posts/spec/05-events.md (2 hunks)
- x/posts/types/events.go (1 hunks)
- x/posts/types/models.go (1 hunks)
- x/profiles/abci_test.go (1 hunks)
- x/profiles/ibc_module.go (3 hunks)
- x/profiles/keeper/keeper_app_links.go (2 hunks)
- x/profiles/keeper/keeper_app_links_test.go (5 hunks)
- x/profiles/keeper/keeper_chain_links.go (1 hunks)
- x/profiles/keeper/msg_server_app_link.go (1 hunks)
- x/profiles/keeper/msg_server_app_link_test.go (3 hunks)
- x/profiles/keeper/msg_server_chain_link.go (2 hunks)
- x/profiles/keeper/msg_server_chain_link_test.go (2 hunks)
- x/profiles/keeper/msg_server_dtag_transfers.go (4 hunks)
- x/profiles/keeper/msg_server_dtag_transfers_test.go (6 hunks)
- x/profiles/keeper/msgs_server_profile.go (2 hunks)
- x/profiles/keeper/msgs_server_profile_test.go (5 hunks)
- x/profiles/spec/05-events.md (2 hunks)
- x/profiles/types/events.go (1 hunks)
- x/reactions/keeper/msg_server.go (7 hunks)
- x/reactions/keeper/msg_server_test.go (8 hunks)
- x/reactions/spec/05-events.md (1 hunks)
- x/reactions/types/events.go (1 hunks)
- x/relationships/keeper/msg_server.go (5 hunks)
- x/relationships/keeper/msg_server_test.go (5 hunks)
- x/relationships/spec/05-events.md (1 hunks)
- x/relationships/types/events.go (1 hunks)
- x/reports/keeper/msg_server.go (7 hunks)
- x/reports/keeper/msg_server_test.go (7 hunks)
- x/reports/spec/05-events.md (1 hunks)
- x/reports/types/events.go (1 hunks)
- x/subspaces/keeper/msg_server.go (24 hunks)
- x/subspaces/keeper/msg_server_test.go (25 hunks)
- x/subspaces/spec/05-events.md (1 hunks)
- x/subspaces/types/events.go (1 hunks)
Files not reviewed due to errors (1)
- x/subspaces/keeper/msg_server_test.go (Error: unable to parse review)
Files skipped from review due to trivial changes (6)
- x/posts/types/models.go
- x/profiles/keeper/keeper_app_links.go
- x/profiles/keeper/msg_server_dtag_transfers.go
- x/profiles/keeper/msgs_server_profile.go
- x/profiles/keeper/msgs_server_profile_test.go
- x/reactions/types/events.go
Additional comments: 158
types/utils/slices.go (1)
- 3-8: The implementation of the
Map
function looks good. It correctly applies a transformation function to each element of the input slice, adhering to Go's generic type parameters. This addition enhances the utility functions provided by the package.x/relationships/types/events.go (1)
- 6-9: The renaming of event types and attributes in the
events.go
file enhances clarity and consistency across the relationships module. RemovingAttributeKeySubspace
aligns with the PR's objectives to refine the codebase.x/reports/types/events.go (1)
- 6-12: The renaming of event types and attributes in the
events.go
file enhances clarity and consistency across the reports module. The changes align with the PR's objectives to refine the codebase and improve readability.x/posts/abci.go (2)
- 6-7: The addition of the
subspacestypes
import statement in theabci.go
file is appropriate for accessing theAttributeKeySubspaceID
constant. This change supports the updated event attribute usage within theEndBlocker
function.- 23-24: Updating the event type to
EventTypeTalliedPoll
and usingsubspacestypes.AttributeKeySubspaceID
for the attribute key in theEndBlocker
function enhances clarity and consistency with the rest of the project. These changes align with the PR's objectives to refine event handling.x/posts/types/events.go (1)
- 5-16: The renaming of event type constants and attribute keys in the
events.go
file enhances clarity and consistency across the posts module. These changes align with the PR's objectives to refine the codebase and improve readability.x/subspaces/types/events.go (1)
- 5-24: The renaming of event type constants and the addition of the
AttributeKeyPermissions
in theevents.go
file enhance clarity and consistency across the subspaces module. These changes align with the PR's objectives to refine the codebase and improve event handling.x/profiles/keeper/msg_server_app_link.go (1)
- 52-52: Renaming the event type constant to
EventTypeCreatedApplicationLink
within theLinkApplication
method enhances clarity and consistency with the rest of the project. This change aligns with the PR's objectives to refine event naming.x/profiles/types/events.go (1)
- 6-22: The renaming of event types and the introduction of new event types in the
events.go
file enhance clarity and consistency across the profiles module. These changes align with the PR's objectives to refine the codebase and improve event handling.x/relationships/spec/05-events.md (1)
- 10-56: The updates to the event attribute keys and values in the
05-events.md
file enhance clarity and consistency within the relationships module documentation. These changes align with the PR's objectives to refine the codebase and ensure documentation accuracy.x/profiles/keeper/msg_server_chain_link.go (2)
- 32-32: Renaming the event type to
EventTypeCreatedChainLink
within theLinkChainAccount
function enhances clarity and consistency with the rest of the project. This change aligns with the PR's objectives to refine event naming.- 58-58: Renaming the event type to
EventTypeDeletedChainLink
within theUnlinkChainAccount
function enhances clarity and consistency with the rest of the project. This change aligns with the PR's objectives to refine event naming.x/reports/spec/05-events.md (1)
- 16-82: The updates to the event types and attributes in the
05-events.md
file enhance clarity and consistency within the reports module documentation. These changes align with the PR's objectives to refine the codebase and ensure documentation accuracy.x/profiles/abci_test.go (1)
- 89-89: Updating the event type to
EventTypeDeletedApplicationLink
in theTestBeginBlocker
function enhances clarity and consistency with the rest of the project. This change aligns with the PR's objectives to refine event naming.x/reactions/spec/05-events.md (1)
- 16-65: The updates to the event types and attributes in the
05-events.md
file enhance clarity and consistency within the reactions module documentation. These changes align with the PR's objectives to refine the codebase and ensure documentation accuracy.x/relationships/keeper/msg_server.go (4)
- 53-56: Updating the event type to
EventTypeCreatedRelationship
and usingsubspacestypes.AttributeKeySubspaceID
for the attribute key in theCreateRelationship
function enhances clarity and consistency with the rest of the project. These changes align with the PR's objectives to refine event handling.- 82-85: Updating the event type to
EventTypeDeletedRelationship
and usingsubspacestypes.AttributeKeySubspaceID
for the attribute key in theDeleteRelationship
function enhances clarity and consistency with the rest of the project. These changes align with the PR's objectives to refine event handling.- 111-114: Updating the event type to
EventTypeBlockedUser
and usingsubspacestypes.AttributeKeySubspaceID
for the attribute key in theBlockUser
function enhances clarity and consistency with the rest of the project. These changes align with the PR's objectives to refine event handling.- 140-143: Updating the event type to
EventTypeUnblockedUser
and usingsubspacestypes.AttributeKeySubspaceID
for the attribute key in theUnblockUser
function enhances clarity and consistency with the rest of the project. These changes align with the PR's objectives to refine event handling.x/profiles/keeper/keeper_chain_links.go (1)
- 59-66: Emitting the
EventTypeSavedChainLink
event with detailed attributes in theSaveChainLink
method enhances functionality by providing more detailed event logging. This addition aligns with the PR's objectives to refine event handling within the profiles module.x/posts/spec/05-events.md (12)
- 16-22: The event type and attribute keys have been updated to reflect the action more accurately, changing from
create_post
tocreated_post
. This change improves semantic clarity.- 29-33: The event type and attribute keys have been updated to
edited_post
, enhancing semantic clarity by indicating the past action of editing a post.- 40-43: The event type and attribute keys have been updated to
deleted_post
, which more accurately reflects the action of deleting a post.- 50-55: The event type and attribute keys have been updated to
added_post_attachment
, improving semantic clarity by indicating the addition of an attachment to a post.- 62-66: The event type and attribute keys have been updated to
removed_post_attachment
, enhancing semantic clarity by indicating the removal of an attachment from a post.- 74-78: The event type and attribute keys have been updated to
answered_poll
, which more accurately reflects the action of answering a poll associated with a post.- 93-97: The event type and attribute keys have been updated to
moved_post
, improving semantic clarity by indicating the action of moving a post to a different subspace or section.- 105-109: The event type and attribute keys have been updated to
requested_post_owner_transfer
, which more accurately reflects the action of requesting the transfer of post ownership.- 117-121: The event type and attribute keys have been updated to
canceled_post_owner_transfer
, enhancing semantic clarity by indicating the cancellation of a post owner transfer request.- 128-132: The event type and attribute keys have been updated to
accepted_post_owner_transfer
, improving semantic clarity by indicating the acceptance of a post owner transfer request.- 141-145: The event type and attribute keys have been updated to
refused_post_owner_transfer
, which more accurately reflects the action of refusing a post owner transfer request.- 154-156: The event type and attribute keys have been updated to
tallied_poll
, enhancing semantic clarity by indicating the completion and tallying of a poll associated with a post.x/profiles/keeper/msg_server_chain_link_test.go (3)
- 111-115: The event type
EventTypeSavedChainLink
and associated attributes have been correctly updated to reflect the action of saving a chain link. This change enhances the clarity and accuracy of the event.- 117-117: The addition of the
EventTypeCreatedChainLink
event type and its attributes accurately reflects the creation of a new chain link. This is a positive change that adds detail to the events emitted by the system.- 208-208: The event type
EventTypeDeletedChainLink
and associated attributes have been correctly updated to reflect the action of deleting a chain link. This change enhances the clarity and accuracy of the event.x/reports/keeper/msg_server.go (7)
- 98-100: The event type
EventTypeReportedPost
and attribute keys have been updated to reflect the action of reporting a post more accurately. This change improves semantic clarity.- 105-106: The event type
EventTypeReportedUser
and attribute keys have been updated to reflect the action of reporting a user more accurately. This change improves semantic clarity.- 116-117: The event type
EventTypeCreatedReport
and attribute keys have been updated to reflect the action of creating a report more accurately. This change improves semantic clarity.- 158-159: The event type
EventTypeDeletedReport
and attribute keys have been updated to reflect the action of deleting a report more accurately. This change improves semantic clarity.- 208-209: The event type
EventTypeSupportedStandardReason
and attribute keys have been updated to reflect the action of supporting a standard reason for reporting more accurately. This change improves semantic clarity.- 255-256: The event type
EventTypeAddedReportingReason
and attribute keys have been updated to reflect the action of adding a reporting reason more accurately. This change improves semantic clarity.- 290-291: The event type
EventTypeRemovedReportingReason
and attribute keys have been updated to reflect the action of removing a reporting reason more accurately. This change improves semantic clarity.x/relationships/keeper/msg_server_test.go (4)
- 87-90: The event type
EventTypeCreatedRelationship
and attribute keys have been updated to reflect the action of creating a relationship more accurately. This change improves semantic clarity.- 186-189: The event type
EventTypeDeletedRelationship
and attribute keys have been updated to reflect the action of deleting a relationship more accurately. This change improves semantic clarity.- 288-291: The event type
EventTypeBlockedUser
and attribute keys have been updated to reflect the action of blocking a user more accurately. This change improves semantic clarity.- 388-391: The event type
EventTypeUnblockedUser
and attribute keys have been updated to reflect the action of unblocking a user more accurately. This change improves semantic clarity.x/profiles/spec/05-events.md (9)
- 16-24: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 27-32: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 36-43: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 46-53: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 57-65: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 69-75: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 81-98: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 113-121: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency. Additionally, new attributes have been added, enhancing the event's descriptive quality.
- 125-132: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
x/reactions/keeper/msg_server.go (5)
- 95-96: The event type
EventTypeAddedReaction
has been correctly used to reflect the action of adding a reaction. This change aligns with the semantic updates across the project.- 144-145: The event type
EventTypeRemovedReaction
has been correctly used to reflect the action of removing a reaction. This change aligns with the semantic updates across the project.- 194-195: The event type
EventTypeAddedRegisteredReaction
has been correctly used to reflect the action of adding a registered reaction. This change aligns with the semantic updates across the project.- 238-238: The event type
ActionEditRegisteredReaction
is used here, which seems to be a deviation from the established pattern of usingEventType
as a prefix for event types. Please verify if this is intentional and aligns with the project's event naming conventions.- 270-271: The event type
EventTypeRemovedRegisteredReaction
has been correctly used to reflect the action of removing a registered reaction. This change aligns with the semantic updates across the project.x/profiles/ibc_module.go (4)
- 244-246: The event type
EventTypeReceivedLinkChainAccountPacket
correctly reflects the action of receiving a link chain account packet, aligning with the semantic updates across the project. Additionally, the new attributeAttributeKeyChainLinkOwner
enhances the event's descriptive quality.- 275-279: The event type
EventTypeReceivedOracleResponsePacketData
correctly reflects the action of receiving oracle response packet data, aligning with the semantic updates across the project.- 315-321: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [318-329]
The event type
EventTypeReceivedOracleResponsePacketData
is used to reflect the action of receiving oracle response packet data. However, it appears twice with different contexts (acknowledgment success and result). Ensure this usage is consistent and clear in the context of the events being emitted.
- 336-336: The event type
EventTypeReceivedOracleResponsePacketData
is used to reflect the action of receiving oracle response packet data with an error. This usage aligns with the semantic updates across the project, ensuring clarity in event logging.x/subspaces/spec/05-events.md (20)
- 16-24: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 28-33: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 37-42: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 46-52: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 56-62: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 66-72: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 76-82: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 86-92: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 96-102: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 106-112: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 120-120: The addition of the
permissions
attribute to theset_user_group_permissions
event enhances the event's descriptive quality, providing more detail about the permissions set.- 127-133: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 137-144: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 148-155: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 162-163: The addition of the
permissions
attribute to theset_user_permissions
event enhances the event's descriptive quality, providing more detail about the permissions set.- 171-178: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 182-189: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 193-201: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 205-213: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
- 217-223: The event type and attribute keys have been updated to reflect semantic changes, improving clarity and consistency.
x/profiles/keeper/msg_server_app_link_test.go (3)
- 234-240: The renaming of event types from
EventTypesApplicationLinkSaved
andEventTypesApplicationLinkCreated
toEventTypeSavedApplicationLink
andEventTypeCreatedApplicationLink
respectively, as well as fromEventTypeApplicationLinkDeleted
toEventTypeDeletedApplicationLink
, enhances clarity and consistency in the codebase. This change aligns with the PR's objectives and follows best practices for naming conventions.- 340-346: The consistent renaming of event types within the
TestMsgServer_LinkApplication
function further aligns with the PR's objectives to improve clarity and maintainability. The changes are correctly implemented and follow the established naming conventions.- 513-513: The update in the
TestMsgServer_UnlinkApplication
function, whereEventTypeApplicationLinkDeleted
has been changed toEventTypeDeletedApplicationLink
, correctly reflects the action being performed and aligns with the PR's goal of enhancing clarity through better naming conventions.x/profiles/keeper/msg_server_dtag_transfers_test.go (5)
- 86-86: Renaming event types within the
TestMsgServer_RequestDTagTransfer
function toEventTypeRequestedDTagTransferRequest
improves clarity and consistency across the codebase. This change is in line with the PR's objectives and follows best practices for naming conventions.- 153-153: The update in the
TestMsgServer_CancelDTagTransfer
function, where event types have been renamed toEventTypeCanceledDTagTransferRequest
, aligns with the PR's goal of enhancing clarity through better naming conventions. This change correctly reflects the action being performed and follows established best practices.- 367-373: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [370-399]
The renaming of event types within the
TestMsgServer_AcceptDTagTransfer
function toEventTypeAcceptedDTagTransferRequest
is correctly implemented and enhances the codebase's clarity and maintainability. This change aligns with the PR's objectives and follows best practices for naming conventions.
- 437-437: The consistent renaming of event types within the
TestMsgServer_AcceptDTagTransfer
function further aligns with the PR's objectives to improve clarity and maintainability. The changes are correctly implemented and follow the established naming conventions.- 514-514: The update in the
TestMsgServer_RefuseDTagTransfer
function, where event types have been renamed toEventTypeRefusedDTagTransferRequest
, correctly reflects the action being performed and aligns with the PR's goal of enhancing clarity through better naming conventions. This change is in line with the PR's objectives and follows established best practices.x/profiles/keeper/keeper_app_links_test.go (5)
- 65-65: The event type
EventTypeSavedApplicationLink
correctly reflects the action of saving an application link, aligning with the semantic changes mentioned in the PR objectives.- 425-425: The event type
EventTypeDeletedApplicationLink
accurately represents the deletion of an application link, which is consistent with the renaming strategy outlined in the PR objectives.- 479-479: The usage of
EventTypeDeletedApplicationLink
here also correctly signifies the deletion action in a test case scenario, adhering to the new naming conventions.- 533-533: Again,
EventTypeDeletedApplicationLink
is used appropriately to denote the deletion of an application link in a different test scenario, maintaining consistency with the renaming effort.- 587-587: The event type
EventTypeDeletedApplicationLink
is consistently applied across different test scenarios, including this one, which tests the deletion functionality under various conditions.x/posts/keeper/msg_server.go (12)
- 10-10: The import of the
github.com/desmos-labs/desmos/v6/types/utils
package is correctly added to support the new utility functions introduced in the PR.- 109-111: The renaming of the event type to
EventTypeCreatedPost
and the update of attribute keys are in line with the semantic changes described in the PR objectives. This enhances clarity and consistency across the codebase.- 163-164: The event type
EventTypeEditedPost
correctly reflects the action of editing a post, aligning with the semantic updates aimed at improving clarity in the codebase.- 202-203: The use of
EventTypeDeletedPost
for the deletion of a post is consistent with the renaming strategy for event types, improving semantic clarity.- 302-303: The event type
EventTypeAddedPostAttachment
accurately represents the addition of a post attachment, adhering to the new naming conventions for better clarity.- 359-360: Similarly,
EventTypeRemovedPostAttachment
is used appropriately to denote the removal of a post attachment, following the updated event naming conventions.- 438-445: The introduction of
EventTypeAnsweredPoll
with attributes forAnswersIndexes
andAnswerer
is a significant addition. However, the use ofutils.Map
for convertingmsg.AnswersIndexes
to a string list is a good practice for handling such data transformations. This change enhances the event's descriptive quality by including detailed information about the poll answers.- 540-541: The event type
EventTypeMovedPost
along with the new attributes forNewSubspaceID
andNewPostID
correctly reflects the action of moving a post to a different subspace or section. This change is part of the semantic updates to event types and attributes, improving clarity and consistency.- 596-597: The event type
EventTypeRequestedPostOwnerTransfer
is introduced to denote the action of requesting a post owner transfer. This addition aligns with the PR's objectives to enhance functionality and improve semantic clarity in the codebase.- 627-628:
EventTypeCanceledPostOwnerTransfer
is used to represent the cancellation of a post owner transfer request. This naming convention is consistent with the PR's goal of improving semantic clarity and functionality.- 683-684: The use of
EventTypeAcceptedPostOwnerTransfer
for accepting a post owner transfer request is in line with the semantic updates and enhances the clarity of the codebase by accurately describing the action taken.- 713-714: Finally,
EventTypeRefusedPostOwnerTransfer
correctly denotes the refusal of a post owner transfer request, adhering to the updated naming conventions and improving the semantic clarity of the codebase.x/reports/keeper/msg_server_test.go (9)
- 283-284: The event type
CreateReport
has been correctly renamed toCreatedReport
, aligning with the PR's objective to enhance semantic clarity across the codebase. This change is consistent and correctly implemented here.- 290-291: The event type
ReportUser
has been updated toReportedUser
, which is in line with the PR's goal of improving semantic accuracy. This renaming enhances the clarity of the event's purpose.- 379-380: The event type
CreateReport
has been renamed toCreatedReport
for a post target scenario. This change is consistent with the PR's objectives and correctly applied, improving the semantic clarity of the event type.- 386-387: The renaming of the event type from
ReportPost
toReportedPost
is correctly implemented here, aligning with the PR's objectives to enhance semantic clarity and consistency across the codebase.- 594-595: The event type
DeleteReport
has been updated toDeletedReport
, which correctly reflects the action that has occurred. This change is in line with the PR's objectives and is correctly implemented.- 636-637: The event type
DeleteReport
has been correctly renamed toDeletedReport
in the context of a moderator action. This renaming aligns with the PR's goal of improving semantic accuracy and clarity.- 801-802: The event type
SupportStandardReason
has been updated toSupportedStandardReason
, which is consistent with the PR's objectives to enhance semantic clarity. This change is correctly implemented and improves the readability of the event type.- 979-980: The event type
AddReason
has been renamed toAddedReportingReason
, aligning with the PR's objectives to improve semantic clarity and consistency. This change is correctly implemented and enhances the understanding of the event's purpose.- 1118-1119: The event type
RemoveReason
has been updated toRemovedReportingReason
, which is consistent with the PR's objectives to enhance semantic clarity. This change is correctly implemented and improves the readability of the event type.x/reactions/keeper/msg_server_test.go (7)
- 6-7: The import of
subspacestypes
andpoststypes
packages reflects the changes in the codebase to use updated event types and attribute keys. This aligns with the PR's objective to enhance consistency across modules.- 421-423: The event type and attribute keys in the
TestMsgServer_AddReaction
method have been correctly updated to use the new constants fromsubspacestypes
andpoststypes
. This change ensures that the tests reflect the updated event naming conventions and attribute keys, maintaining consistency with the rest of the codebase.- 785-787: The event type and attribute keys in the
TestMsgServer_RemoveReaction
method have been correctly updated to use the new constants fromsubspacestypes
andpoststypes
. This ensures that the tests are aligned with the changes made in the codebase, accurately reflecting the new event naming conventions and attribute keys.- 952-953: The event type and attribute keys in the
TestMsgServer_AddRegisteredReaction
method have been correctly updated to use the new constants fromsubspacestypes
. This change ensures that the tests accurately reflect the updated event naming conventions and attribute keys, maintaining consistency with the rest of the codebase.- 1143-1143: The event type and attribute keys in the
TestMsgServer_EditRegisteredReaction
method have been correctly updated to use the new constants fromsubspacestypes
. This ensures that the tests accurately reflect the updated event naming conventions and attribute keys, maintaining consistency with the rest of the codebase.- 1286-1287: The event type and attribute keys in the
TestMsgServer_RemoveRegisteredReaction
method have been correctly updated to use the new constants fromsubspacestypes
. This ensures that the tests accurately reflect the updated event naming conventions and attribute keys, maintaining consistency with the rest of the codebase.- 1420-1420: The event type in the
TestMsgServer_SetReactionsParams
method has been correctly updated to reflect the changes in the codebase. This ensures that the tests are aligned with the new event naming conventions, maintaining consistency across the project.x/subspaces/keeper/msg_server.go (20)
- 6-6: The import of the "strings" package is added, which is necessary for the new functionality introduced in this file, specifically for joining permissions into a string in the
SetUserGroupPermissions
method.- 55-55: The event type
types.EventTypeCreateSubspace
has been correctly updated totypes.EventTypeCreatedSubspace
to reflect past tense, aligning with the PR's objective to improve clarity and consistency across the codebase.- 100-100: The event type
types.EventTypeEditSubspace
has been correctly updated totypes.EventTypeEditedSubspace
. This change is consistent with the PR's goal of renaming event types for clarity.- 132-132: The event type
types.EventTypeDeleteSubspace
has been updated totypes.EventTypeDeletedSubspace
, which is in line with the PR's objectives to use past tense for event types.- 185-185: The event type
types.EventTypeCreateSection
has been updated totypes.EventTypeCreatedSection
. This change enhances consistency and clarity in the codebase.- 234-234: The event type
types.EventTypeEditSection
has been updated totypes.EventTypeEditedSection
, aligning with the PR's goal of improving clarity through consistent naming conventions.- 290-290: The event type
types.EventTypeMoveSection
has been updated totypes.EventTypeMovedSection
. This change is consistent with the PR's objectives and improves the clarity of the event naming.- 328-328: The event type
types.EventTypeDeleteSection
has been updated totypes.EventTypeDeletedSection
, which aligns with the PR's objectives to use past tense for event types, enhancing clarity.- 404-404: The event type
types.EventTypeCreateUserGroup
has been updated totypes.EventTypeCreatedUserGroup
. This change aligns with the PR's goal of renaming event types for consistency and clarity.- 450-450: The event type
types.EventTypeEditUserGroup
has been updated totypes.EventTypeEditedUserGroup
, which is consistent with the PR's objectives to improve clarity through consistent naming conventions.- 559-559: The use of the "strings" package for joining permissions into a string is appropriate and aligns with the added import. This change is necessary for the functionality introduced in this method.
- 596-596: The event type
types.EventTypeDeleteUserGroup
has been correctly updated totypes.EventTypeDeletedUserGroup
, aligning with the PR's objective to use past tense for event types.- 645-645: The event type
types.EventTypeAddUserToGroup
has been updated totypes.EventTypeAddedUserToGroup
. This change is consistent with the PR's goal of improving clarity through consistent naming conventions.- 690-690: The event type
types.EventTypeRemoveUserFromGroup
has been updated totypes.EventTypeRemovedUserFromGroup
, which aligns with the PR's objectives to use past tense for event types, enhancing clarity.- 742-742: The use of the "strings" package for joining permissions into a string in the
SetUserPermissions
method is appropriate and aligns with the added import. This change is necessary for the functionality introduced in this method.- 785-785: The event type
types.EventTypeGrantTreasuryAuthorization
has been updated totypes.EventTypeGrantedTreasuryAuthorization
, aligning with the PR's objective to use past tense for event types, which enhances clarity.- 823-823: The event type
types.EventTypeRevokeTreasuryAuthorization
has been updated totypes.EventTypeRevokedTreasuryAuthorization
, which is consistent with the PR's goal of renaming event types for clarity.- 852-852: The event type
types.EventTypeGrantAllowance
has been updated totypes.EventTypeGrantedAllowance
. This change aligns with the PR's goal of improving clarity through consistent naming conventions.- 911-911: The event type
types.EventTypeRevokeAllowance
has been updated totypes.EventTypeRevokedAllowance
, which is consistent with the PR's objectives to use past tense for event types, enhancing clarity.- 963-963: The event type
types.EventTypeUpdateSubspaceFeeToken
has been updated totypes.EventTypeUpdatedSubspaceFeeToken
, aligning with the PR's objective to use past tense for event types, which enhances clarity.x/posts/keeper/msg_server_test.go (13)
- 367-369: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 483-485: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 770-771: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 971-972: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 1263-1264: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 1587-1588: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 2191-2192: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 2274-2275: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 2773-2774: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 3162-3163: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 3271-3272: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 3511-3512: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
- 3606-3607: The event attributes use the correct keys after the renaming, ensuring consistency with the updated event types and attribute keys.
Signed-off-by: Riccardo Montagnin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/subspaces/types/events.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/subspaces/types/events.go
Signed-off-by: Riccardo Montagnin <[email protected]>
Overall looks good to me, just some naming unconsistency. |
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (8)
- x/profiles/keeper/msg_server_dtag_transfers.go (4 hunks)
- x/profiles/keeper/msg_server_dtag_transfers_test.go (6 hunks)
- x/profiles/spec/05-events.md (2 hunks)
- x/profiles/types/events.go (1 hunks)
- x/reports/types/events.go (1 hunks)
- x/subspaces/keeper/msg_server.go (24 hunks)
- x/subspaces/keeper/msg_server_test.go (25 hunks)
- x/subspaces/types/events.go (1 hunks)
Files skipped from review as they are similar to previous changes (8)
- x/profiles/keeper/msg_server_dtag_transfers.go
- x/profiles/keeper/msg_server_dtag_transfers_test.go
- x/profiles/spec/05-events.md
- x/profiles/types/events.go
- x/reports/types/events.go
- x/subspaces/keeper/msg_server.go
- x/subspaces/keeper/msg_server_test.go
- x/subspaces/types/events.go
Signed-off-by: Riccardo Montagnin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type: refactor | ||
module: other | ||
pull_request: 1295 | ||
description: Updated the event andattributes names for better naming consistency |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in "andattributes" should be "and attributes".
- description: Updated the event andattributes names for better naming consistency
+ description: Updated the event and attributes names for better naming consistency
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
description: Updated the event andattributes names for better naming consistency | |
description: Updated the event and attributes names for better naming consistency |
Description
This PR improves the overall event emissions by standardizing the event names. It also adds missing attributes and events emissions where useful.
Closes: DCD-441, DCD-442, DCD-443, DCD-444, DCD-445
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking changeSummary by CodeRabbit