├── .github ├── ISSUE_TEMPLATE │ └── config.yml └── pull_request_template.md ├── .gitignore ├── .prettierrc ├── 0000-template.md ├── README.md └── active-rfcs ├── 0001-new-slot-syntax.md ├── 0002-slot-syntax-shorthand.md ├── 0003-dynamic-directive-arguments.md ├── 0004-global-api-treeshaking.md ├── 0005-replace-v-bind-sync-with-v-model-argument.md ├── 0006-slots-unification.md ├── 0007-functional-async-api-change.md ├── 0008-render-function-api-change.md ├── 0009-global-api-change.md ├── 0011-v-model-api-change.md ├── 0012-custom-directive-api-change.md ├── 0013-composition-api.md ├── 0014-drop-keycode-support.md ├── 0015-remove-filters.md ├── 0016-remove-inline-templates.md ├── 0017-transition-as-root.md ├── 0018-transition-class-change.md ├── 0019-remove-data-object-declaration.md ├── 0020-events-api-change.md ├── 0021-router-link-scoped-slot.md ├── 0022-router-merge-meta-routelocation.md ├── 0023-scoped-styles-changes.md ├── 0024-attribute-coercion-behavior.md ├── 0025-teleport.md ├── 0026-async-component-api.md ├── 0027-custom-elements-interop.md ├── 0028-router-active-link.md ├── 0029-router-dynamic-routing.md ├── 0030-emits-option.md ├── 0031-attr-fallthrough.md ├── 0032-vtu-improve-async-workflow.md ├── 0033-router-navigation-failures.md ├── 0034-router-view-keep-alive-transitions.md ├── 0035-router-scroll-position.md ├── 0036-router-view-route-prop.md ├── 0037-router-return-guards.md ├── 0038-vue3-ie11-support.md ├── 0039-vtu-api.md ├── 0040-script-setup.md ├── 0041-reactivity-effect-scope.md ├── 0042-expose-api.md ├── 0043-sfc-style-variables.md └── 0044-router-push-history-state.md /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: 🙏 Question or Help 4 | url: https://github.com/vuejs/rfcs/discussions/new 5 | about: If you have a question or need help, ask a question on the discussion forums. 6 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Summary 2 | 3 | 7 | 8 | ## Links 9 | 10 | 15 | 16 | - [Full Rendered Proposal]() 17 | 18 | 24 | 25 | - [Discussion Thread]() 26 | 27 | 28 | 29 | --- 30 | 31 | **Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.** 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | semi: false 2 | singleQuote: true 3 | printWidth: 80 4 | trailingComma: 'none' -------------------------------------------------------------------------------- /0000-template.md: -------------------------------------------------------------------------------- 1 | - Start Date: (fill me in with today's date, YYYY-MM-DD) 2 | - Target Major Version: (2.x / 3.x) 3 | - Reference Issues: (fill in existing related issues, if any) 4 | - Implementation PR: (leave this empty) 5 | 6 | # Summary 7 | 8 | Brief explanation of the feature. 9 | 10 | # Basic example 11 | 12 | If the proposal involves a new or changed API, include a basic code example. 13 | Omit this section if it's not applicable. 14 | 15 | # Motivation 16 | 17 | Why are we doing this? What use cases does it support? What is the expected 18 | outcome? 19 | 20 | Please focus on explaining the motivation so that if this RFC is not accepted, 21 | the motivation could be used to develop alternative solutions. In other words, 22 | enumerate the constraints you are trying to solve without coupling them too 23 | closely to the solution you have in mind. 24 | 25 | # Detailed design 26 | 27 | This is the bulk of the RFC. Explain the design in enough detail for somebody 28 | familiar with Vue to understand, and for somebody familiar with the 29 | implementation to implement. This should get into specifics and corner-cases, 30 | and include examples of how the feature is used. Any new terminology should be 31 | defined here. 32 | 33 | # Drawbacks 34 | 35 | Why should we *not* do this? Please consider: 36 | 37 | - implementation cost, both in term of code size and complexity 38 | - whether the proposed feature can be implemented in user space 39 | - the impact on teaching people Vue 40 | - integration of this feature with other existing and planned features 41 | - cost of migrating existing Vue applications (is it a breaking change?) 42 | 43 | There are tradeoffs to choosing any path. Attempt to identify them here. 44 | 45 | # Alternatives 46 | 47 | What other designs have been considered? What is the impact of not doing this? 48 | 49 | # Adoption strategy 50 | 51 | If we implement this proposal, how will existing Vue developers adopt it? Is 52 | this a breaking change? Can we write a codemod? Can we provide a runtime adapter library for the original API it replaces? How will this affect other projects in the Vue ecosystem? 53 | 54 | # Unresolved questions 55 | 56 | Optional, but suggested for first drafts. What parts of the design are still 57 | TBD? 58 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vue RFCs 2 | 3 | ## What is an RFC? 4 | 5 | The "RFC" (request for comments) process is intended to provide a 6 | consistent and controlled path for new features to enter the framework. 7 | 8 | Many changes, including bug fixes and documentation improvements can be 9 | implemented and reviewed via the normal GitHub pull request workflow. 10 | 11 | Some changes though are "substantial", and we ask that these be put 12 | through a bit of a design process and produce a consensus among the Vue 13 | [core team] and the community. 14 | 15 | ## The RFC life-cycle 16 | 17 | An RFC goes through the following stages: 18 | 19 | - **Pending:** when the RFC is submitted as a discussion thread. We use discussions instead of Pull Requests as the former provides better discussion threading. 20 | - **Active:** when an RFC is acknowledged and undergoing implementation. The feature may be shipped as experimental during this phase. 21 | - **Landed:** when an RFC's proposed changes are shipped as stable in a release. 22 | - **Rejected:** when an RFC is officially rejected or dropped. 23 | 24 | ## When to follow this process 25 | 26 | You need to follow this process if you intend to make "substantial" 27 | changes to [Vue core](https://github.com/vuejs/core). 28 | 29 | We are limiting the RFC process to core to keep the workflow manageable. If you wish to suggest changes to those other projects, please use their respective issue lists. 30 | 31 | What constitutes a "substantial" change is evolving based on community norms, but may include the following: 32 | 33 | - A new feature that creates new API surface area 34 | - Changing the semantics or behavior of an existing API 35 | - The removal of features that are already shipped as part of the release channel. 36 | - The introduction of new idiomatic usage or conventions, even if they do not include code changes to Vue itself. 37 | 38 | Some changes do not require an RFC: 39 | 40 | - Additions that strictly improve objective, numerical quality criteria (speedup, better browser support) 41 | - Fixing objectively incorrect behavior 42 | - Rephrasing, reorganizing or refactoring 43 | - Addition or removal of warnings 44 | - Additions only likely to be _noticed by_ other implementors-of-Vue, invisible to users-of-Vue. 45 | 46 | If you submit a pull request to implement a new feature without going 47 | through the RFC process, it may be closed with a polite request to 48 | submit an RFC first. 49 | 50 | ## Why do you need to do this 51 | 52 | It is great that you are considering suggesting new features or changes to Vue - we appreciate your willingness to contribute! However, as Vue becomes more widely used, we need to take stability more seriously, and thus have to carefully consider the impact of every change we make that may affect end users. On the other hand, we also feel that Vue has reached a stage where we want to start consciously preventing further complexity from new API surfaces. 53 | 54 | These constraints and tradeoffs may not be immediately obvious to users who are proposing a change just to solve a specific problem they just ran into. The RFC process serves as a way to guide you through our thought process when making changes to Vue, so that we can be on the same page when discussing why or why not these changes should be made. 55 | 56 | ## Gathering feedback before submitting 57 | 58 | It's often helpful to get feedback on your concept before diving into the 59 | level of API design detail required for an RFC. **You may open an 60 | issue on this repo to start a high-level discussion**, with the goal of 61 | eventually formulating an RFC pull request with the specific implementation 62 | design. 63 | 64 | ## What the process is 65 | 66 | In short, to get a major feature added to Vue, one must first get the 67 | RFC merged into the RFC repo as a markdown file. At that point the RFC 68 | is 'active' and may be implemented with the goal of eventual inclusion 69 | into Vue. 70 | 71 | 1. Work on your proposal in a Markdown file based on the template (`0000-template.md`) found in this repo. 72 | 73 | - Put care into the details: **RFCs that do not present convincing motivation, demonstrate understanding of the impact of the design, or are disingenuous about the drawbacks or alternatives tend to be poorly-received**. 74 | 75 | 2. Open a new thread in [Discussions](https://github.com/vuejs/rfcs/discussions) and make sure to set category to "RFC Discussions". 76 | 77 | - Build consensus and integrate feedback in the discussion thread. RFCs that have broad support are much more likely to make progress than those that don't receive any comments. 78 | 79 | 3. Eventually, the [core team] will decide whether the RFC is a candidate 80 | for inclusion in Vue. 81 | 82 | - An RFC can be modified based upon feedback from the [core team] and community. Significant modifications may trigger a new final comment period. 83 | 84 | - An RFC may be rejected after public discussion has settled and comments have been made summarizing the rationale for rejection. A member of the [core team] should then close the RFC's associated pull request. 85 | 86 | - An RFC may be accepted at the close of its final comment period. A [core team] member will merge the RFC's associated pull request, at which point the RFC will become 'active'. 87 | 88 | 4. If the proposal has been approved for inclusion, you can prepare a Pull Request: 89 | 90 | - Fork this repo. 91 | 92 | - Create your proposal as `active-rfcs/0000-my-feature.md` (where "my-feature" is descriptive. don't assign an RFC number yet). 93 | 94 | - Submit a pull request. Make sure to link to the discussion thread. 95 | 96 | ## Details on Active RFCs 97 | 98 | Once an RFC becomes active then authors may implement it and submit the 99 | feature as a pull request to the Vue core repo. Becoming 'active' is not a rubber 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 RFC's can be done in followup PR's. 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 | An active RFC should have the link to the implementation PR listed if there is one. Feedback to the actual implementation should be conducted in the implementation PR instead of the original RFC PR. 122 | 123 | If you are interested in working on the implementation for an 'active' 124 | RFC, but cannot determine if someone else is already working on it, 125 | feel free to ask (e.g. by leaving a comment on the associated issue). 126 | 127 | ## Reviewing RFC's 128 | 129 | Members of the [core team] will attempt to review some set of open RFC 130 | pull requests on a regular basis. If a [core team] member believes an RFC PR is ready to be accepted into active status, they can approve the PR using GitHub's review feature to signal their approval of the RFC. 131 | 132 | **Vue's RFC process owes its inspiration to the [React RFC process], [Rust RFC process] and [Ember RFC process]** 133 | 134 | [react rfc process]: https://github.com/reactjs/rfcs 135 | [rust rfc process]: https://github.com/rust-lang/rfcs 136 | [ember rfc process]: https://github.com/emberjs/rfcs 137 | [core team]: https://vuejs.org/about/team.html 138 | -------------------------------------------------------------------------------- /active-rfcs/0001-new-slot-syntax.md: -------------------------------------------------------------------------------- 1 | - Start Date: 2019-01-14 2 | - Target Major Version: 2.x & 3.x 3 | - Reference Issues: https://github.com/vuejs/vue/issues/7740, https://github.com/vuejs/vue/issues/9180, https://github.com/vuejs/vue/issues/9306 4 | - Implementation PR: (leave this empty) 5 | 6 | # Summary 7 | 8 | Introducing a new syntax for scoped slots usage: 9 | 10 | - New directive `v-slot` that unifies `slot` and `slot-scope` in a single directive syntax. 11 | 12 | - Shorthand for `v-slot` that can potentially unify the usage of both scoped and normal slots. 13 | 14 | # Basic example 15 | 16 | Using `v-slot` to declare the props passed to the scoped slots of ``: 17 | 18 | ``` html 19 | 20 | 21 | {{ msg }} 22 | 23 | 24 | 25 | 26 | 29 | 30 | ``` 31 | 32 | # Motivation 33 | 34 | When we first introduced scoped slots, it was verbose because it required always using `