Improve accuracy of Frontend packages, events documentation#9814
Merged
Conversation
changelog: Internal, Documentation, Improve accuracy of frontend architecture documentation
zachmargolis
approved these changes
Dec 20, 2023
| This mapping associates the event name logged from the frontend with the corresponding method from | ||
| [AnalyticsEvents][analytics_events.rb] to be called. All properties will be passed automatically to | ||
| the event from the frontend as long as they are defined in the method argument signature. | ||
| This is an allowlist of events defined in [AnalyticsEvents][analytics_events.rb] which are allowed |
Contributor
There was a problem hiding this comment.
does this URL need to point at the actual file?
Suggested change
| This is an allowlist of events defined in [AnalyticsEvents][analytics_events.rb] which are allowed | |
| This is an allowlist of events defined in [AnalyticsEvents][../app/services/analytics_events.rb] which are allowed |
Contributor
Author
There was a problem hiding this comment.
This comment is making me realize that the way I went about this is prone to causing confusion, but these are using reference links, defined at the end of the heading section:
Lines 152 to 153 in c7fa569
| @@ -138,9 +136,9 @@ See [`@18f/identity-analytics` package documentation][analytics_package] for cod | |||
| how to track an event in JavaScript. | |||
|
|
|||
| Any event logged from the frontend must be added to the `ALLOWED_EVENTS` allowlist in [`FrontendLogController`][frontend_log_controller.rb]. | |||
Contributor
There was a problem hiding this comment.
same: fix path?
Suggested change
| Any event logged from the frontend must be added to the `ALLOWED_EVENTS` allowlist in [`FrontendLogController`][frontend_log_controller.rb]. | |
| Any event logged from the frontend must be added to the `ALLOWED_EVENTS` allowlist in [`FrontendLogController`][../app/controllers/frontend_log_controller.rb]. |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 Summary of changes
Updates the Frontend Architecture documentation to improve a few inaccuracies:
privatemust be specified in allpackage.json(enforced byscripts/validate-workspaces.js), not just for published packagesindex.jsdocumentation, also using the recommended TypeScript file extension, and allowing equivalentexportsormainpacksALLOWED_EVENTSaccurately as an allowlist, rather than a mapping📜 Testing Plan
Verify that documentation revisions are sensible.