|
| 1 | +# Lightning Web Component RFCs |
| 2 | + |
| 3 | +Many changes, including bug fixes and documentation improvements can be |
| 4 | +implemented and reviewed via the normal GitHub pull request workflow. |
| 5 | + |
| 6 | +Some changes though are "substantial", and we ask that these be put |
| 7 | +through a bit of a design process and produce a consensus among the Lightning Web Components |
| 8 | +core team. |
| 9 | + |
| 10 | +The "RFC" (request for comments) process is intended to provide a |
| 11 | +consistent and controlled path for new features to enter the project. |
| 12 | + |
| 13 | +[Active RFC List](https://github.com/salesforce/lwc-rfcs/pulls) |
| 14 | + |
| 15 | +Lightning Web Components is still **actively developing** this process, and it will still change as |
| 16 | +more features are implemented and the community settles on specific approaches |
| 17 | +to feature development. |
| 18 | + |
| 19 | +## Contributor License Agreement (CLA) |
| 20 | + |
| 21 | +In order to accept your pull request, we need you to submit a CLA. You only need |
| 22 | +to do this once, so if you've done this for another Salesforce open source |
| 23 | +project, you're good to go. If you are submitting a pull request for the first |
| 24 | +time, just let us know that you have completed the CLA and we can cross-check |
| 25 | +with your GitHub username. |
| 26 | + |
| 27 | +**[Complete your CLA here.](https://cla.salesforce.com/sign-cla)** |
| 28 | + |
| 29 | +## When to follow this process |
| 30 | + |
| 31 | +You should consider using this process if you intend to make "substantial" |
| 32 | +changes to Lightning Web Components or its documentation. Some examples that would benefit |
| 33 | +from an RFC are: |
| 34 | + |
| 35 | + - A new feature that creates new API surface area, and would |
| 36 | + require a feature flag if introduced. |
| 37 | + - The removal of features that already shipped as part of the release |
| 38 | + channel. |
| 39 | + - The introduction of new idiomatic usage or conventions, even if they |
| 40 | + do not include code changes to Lightning Web Components itself. |
| 41 | + |
| 42 | +The RFC process is a great opportunity to get more eyeballs on your proposal |
| 43 | +before it becomes a part of a released version of Lightning Web Components. Quite often, even |
| 44 | +proposals that seem "obvious" can be significantly improved once a wider |
| 45 | +group of interested people have a chance to weigh in. |
| 46 | + |
| 47 | +The RFC process can also be helpful to encourage discussions about a proposed |
| 48 | +feature as it is being designed, and incorporate important constraints into |
| 49 | +the design while it's easier to change, before the design has been fully |
| 50 | +implemented. |
| 51 | + |
| 52 | +Some changes do not require an RFC: |
| 53 | + |
| 54 | + - Rephrasing, reorganizing or refactoring |
| 55 | + - Addition or removal of warnings |
| 56 | + - Additions that strictly improve objective, numerical quality |
| 57 | + criteria (speedup, better browser support) |
| 58 | + - Additions only likely to be _noticed by_ other implementors-of-Lightning Web Components, |
| 59 | + invisible to users-of-Lightning Web Components. |
| 60 | + |
| 61 | +## What the process is |
| 62 | + |
| 63 | +In short, to get a major feature added to Lightning Web Components, one usually first gets |
| 64 | +the RFC merged into the RFC repo as a markdown file. At that point the RFC |
| 65 | +is 'active' and may be implemented with the goal of eventual inclusion |
| 66 | +into Lightning Web Components. |
| 67 | + |
| 68 | +* Fork the RFC repo http://github.com/salesforce/lwc-rfcs |
| 69 | +* Copy `0000-template.md` to `text/0000-my-feature.md` (where |
| 70 | +'my-feature' is descriptive. Don't assign an RFC number yet). |
| 71 | +* Fill in the RFC. Put care into the details: **RFCs that do not |
| 72 | +present convincing motivation, demonstrate understanding of the |
| 73 | +impact of the design, or are disingenuous about the drawbacks or |
| 74 | +alternatives tend to be poorly-received**. |
| 75 | +* Submit a pull request. As a pull request the RFC will receive design |
| 76 | +feedback from the larger community, and the author should be prepared |
| 77 | +to revise it in response. |
| 78 | +* Build consensus and integrate feedback. RFCs that have broad support |
| 79 | +are much more likely to make progress than those that don't receive any |
| 80 | +comments. |
| 81 | +* Eventually, the team will decide whether the RFC is a candidate |
| 82 | +for inclusion in Lightning Web Components. |
| 83 | +* RFCs that are candidates for inclusion in Lightning Web Components will enter a "final comment |
| 84 | +period" lasting 3 calendar days. The beginning of this period will be signaled with a |
| 85 | +comment and tag on the RFCs pull request. |
| 86 | +* An RFC can be modified based upon feedback from the team and community. |
| 87 | +Significant modifications may trigger a new final comment period. |
| 88 | +* An RFC may be rejected by the team after public discussion has settled |
| 89 | +and comments have been made summarizing the rationale for rejection. A member of |
| 90 | +the team should then close the RFCs associated pull request. |
| 91 | +* An RFC may be accepted at the close of its final comment period. A team |
| 92 | +member will merge the RFCs associated pull request, at which point the RFC will |
| 93 | +become 'active'. |
| 94 | + |
| 95 | +## The RFC life-cycle |
| 96 | + |
| 97 | +Once an RFC becomes active, then authors may implement it and submit the |
| 98 | +feature as a pull request to the Lightning Web Components repo. Becoming 'active' is not a rubber |
| 99 | +stamp, and in particular still does not mean the feature will ultimately |
| 100 | +be merged; it does mean that the core team has agreed to it in principle |
| 101 | +and are amenable to merging it. |
| 102 | + |
| 103 | +Furthermore, the fact that a given RFC has been accepted and is |
| 104 | +'active' implies nothing about what priority is assigned to its |
| 105 | +implementation, nor whether anybody is currently working on it. |
| 106 | + |
| 107 | +Modifications to active RFCs can be done in followup PRs. We strive |
| 108 | +to write each RFC in a manner that it will reflect the final design of |
| 109 | +the feature; but the nature of the process means that we cannot expect |
| 110 | +every merged RFC to actually reflect what the end result will be at |
| 111 | +the time of the next major release; therefore we try to keep each RFC |
| 112 | +document somewhat in sync with the language feature as planned, |
| 113 | +tracking such changes via followup pull requests to the document. |
| 114 | + |
| 115 | +## Implementing an RFC |
| 116 | + |
| 117 | +The author of an RFC is not obligated to implement it. Of course, the |
| 118 | +RFC author (like any other developer) is welcome to post an |
| 119 | +implementation for review after the RFC has been accepted. |
| 120 | + |
| 121 | +If you are interested in working on the implementation for an 'active' |
| 122 | +RFC, but cannot determine if someone else is already working on it, |
| 123 | +feel free to ask (e.g. by leaving a comment on the associated issue). |
| 124 | + |
| 125 | +## Reviewing RFCs |
| 126 | + |
| 127 | +Each week the team will attempt to review some set of open RFC |
| 128 | +pull requests. |
| 129 | + |
| 130 | +We try to make sure that any RFC that we accept is accepted at the |
| 131 | +weekly team meeting. Every accepted feature should have a core team champion, |
| 132 | +who will represent the feature and its progress. |
| 133 | + |
| 134 | +**Lightning Web Components's RFC process owes its inspiration to the [React RFC process], [Yarn RFC process], [Rust RFC process], and [Ember RFC process]** |
| 135 | + |
| 136 | +[React RFC process]: https://github.com/reactjs/rfcs |
| 137 | +[Yarn RFC process]: https://github.com/yarnpkg/rfcs |
| 138 | +[Rust RFC process]: https://github.com/rust-lang/rfcs |
| 139 | +[Ember RFC process]: https://github.com/emberjs/rfcs |
0 commit comments