Skip to content

Commit 3cc4b35

Browse files
committed
docs: update the slot naming ADR
1 parent 3abf232 commit 3cc4b35

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

docs/decisions/0009-slot-naming-and-lifecycle.rst

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,20 @@ consistent names.
133133

134134
For the purposes of versioning, a given slot's API contract is comprised of:
135135

136-
* Its location, visual or otherwise, in the Module
137-
* The type (but not implementation!) of the content it is expected to wrap
138-
* The specific set of properties, options, and operations it supports
136+
* Its React props, with the notable exclusion of ``props.children`` (also known
137+
as "default content")
139138

140-
If one of the above changes for a particular slot in such a way that existing
141-
widgets break or present undefined behavior, *and* if it still make sense to
142-
use the same Identifier, the version string appended to its name will be
143-
incremented by `1`.
139+
* The location where it's rendered on the page
140+
141+
* The general type of content it's expected to wrap (though this does not
142+
include the presence, absence, shape, or implementation of child widgets: a
143+
given slot's content, default or otherwise, is explicitly *not* part of the
144+
slot's contract, and may change at any time)
144145

145-
Note: a given slot's default content is explicitly *not* part of its contract.
146-
Changes to it do not result in a version bump.
146+
If one of the above changes for a particular slot in such a way that existing
147+
widgets can be reasonably expected to break or present otherwise undesireable
148+
behavior, *and* if it still make sense to use the same Identifier, the version
149+
string appended to its name will be incremented by `1`.
147150

148151
3. Deprecation process
149152
----------------------
@@ -159,7 +162,7 @@ developer will take care to:
159162
least one Open edX release where it co-exists with the new version
160163

161164
* Implement the new version of the slot in such a way that coexists with the
162-
previous one with no detriment to either's functionality
165+
previous one with no detriment to either one's functionality
163166

164167

165168
Consequences

0 commit comments

Comments
 (0)