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.
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
docs(adr): add Developing and Publishing ClientSide Behaviours #250
docs(adr): add Developing and Publishing ClientSide Behaviours #250
Changes from all commits
288005c
bac87dc
6fa2a47
c08589c
d5c6e7c
45a918c
1baf464
6d444f7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
👋🏻 one other thought here: have we considered if we might want to provide some sort of encapsulation of the Javascript we write for ViewComponents? I could see us coupling the two together in similar fashion to our explorations of CSS modules, generating a selector specifically for a component and using it in the JS.
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.
Our current architecture is leveraging Web Components, which are encapsulated by tag name. Attempting to define an already defined web component causes an exception on the front-end.
Web Components are encapsulated in that they are only activated for/on the pre-defined tags. In other words behaviour is not executed globally, only when an element enters the dom.
Not in the scope of this ADR but something I want to explore further is adding a suite of meta-tests which assert that the JS follows good conventions, such as:
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.
This is the aspect I'm curious about. Can we provide an architecture where this exception is raised at compile time or as part of a test suite?
(This isn't a blocker at all)
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.
This is already implicitly part of our test suite as we include the compiled bundle in the system tests!