Open jattasNI opened 1 year ago
Beachball change files
"dependentChangeType": "none"
to prevent unnecessary new release of packages using itTesting
Element
types as they leak implementation detail and expose too much API surface area. Instead they should expose methods that access specific properties of the element and return primitive types.Storybook
Styles
inherit
See examples in discussion 1 and discussion 2unset
and revert
keywords probably don't do what you think they do. Read the mdn docs carefully; they are probably not part of the solution you are looking for.display
modes being applied to a elements in a template. Largely we should be using one of the layouts flex
/grid
(block) or inline-flex
/inline-grid
(inline). If there are a lot of different display modes being used to layout a template that may be a sign to double check the layout at a high-level.Component index.ts
PR structure
TypeScript
!
) should be specific to places where TypeScript could not infer the type correctly. It should not be used to avoid properly handling corner cases in the code.Buddy Reviews
The Nimble Code Review process states that contributions from outside the Nimble dev team should have reviews from a member of the Nimble Team before moving to Owners review.
If you are outside the NI organization, create an issue for discussion ideally before creating a PR.
If you are inside the NI organization and new to contributing to Nimble reach out on the Design System Teams channel to discuss your goals and get a Nimble point of contact.
Current Nimble Contacts:
Component Templates
class
is stitched together with multiple bindings).
See detailed examples: https://github.com/ni/nimble/issues/1843#issuecomment-2064663561Related Changes
Upgrading dependencies
In the course of updating dependencies you may find that some dependencies get upgraded with a semver range that actually breaks the build. For example:
"awesome-dep": "^1.0.0"
package-lock.json
has a resolved dependency on awesome-dep@1.0.1
which is great, a patch release that does not break an API and fixes a bug.package-lock.json
so it has a resolved dependency on awesome-dep@1.0.2
which is still in our declared semver range and would hopefully be great and fix a bug but, ah!, the package maintainers accidentally released a version that broke our build 😢package-lock.json
by doing different incantations to avoid that package updating and get a passing build. You have found that our supported semver range is actually broken. The repo is in a bad state. We don't actually support awesome-dep@^1.0.0
because some of those patch or minor releases ended up being breaking.
"awesome-dep": "^1.0.0"
, is not actually supported. It is particularly bad if it is a dependency
instead of a devDependency
. It means that potentially a new app that is created or a down stream client that rebuilds their lock file etc, will hit an issue leveraging our package because our own declared "supported" dependency range breaks us. It's unearthing a ticking time bomb that will blow. Something to address ASAP.package-lock.json
, doing a git clean -fdx
to purge all node_modules
, and running npm install
to create a new lock file.package.json
updates to resolve to supported versions. Some options:"awesome-dep": "^1.0.2"
, rebuild the lock file, and submit"awesome-dep": "1.0.1"
(the last good known version), rebuild the lock file and see if the new resolved version fixes the issue, and create a tech debt item to unpin the version (and make sure it moves towards being fixed!)Handling unstable stories
If you see a chromatic diff for unstable stories (such as the menu stories) verify the snapshots but do not accept bad snapshots. Instead to create good snapshots you should be able to do the following:
Avoid memory leaks
addEventListener
and removeEventListener
are cleaned up in the disconnectedCallback
Observable.getNotifier
and notifierRef.subscribe
are cleaned up in the disconnectedCallback
🧹 Tech Debt
We'll use this issue to collect common issues found in PR review. Put the issues in comments, feel free to edit other people's comments with more info (does everyone have that permission?)
Once we've collected enough we can figure out what to do with the list. Maybe a code review checklist, maybe training material, maybe automated lint rules to catch this stuff for us, maybe capturing it in CONTRIBUTING in more detail.