diff --git a/.github/pull_request.md b/.github/pull_request.md new file mode 100644 index 000000000..6615a77de --- /dev/null +++ b/.github/pull_request.md @@ -0,0 +1,10 @@ +## What does this PR do? + + + +## Checklist before merging + +- [ ] If there is a related issue, please link it in the description. +- [ ] If it is a code or documentation change, please make sure the changes are reflected in the `CHANGELOG.md` file. +- [ ] If this is a breaking change, please write one phrase about this update in the `Breaking` section of `CHANGELOG.md` file. + diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..0651d3e7e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,76 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +Please keep one empty line before and after all headers. (This is required for `git` to produce a conflict when a release is made while a PR is open and the PR's changelog entry would go into the wrong section). + +There are 5 types of changes: + +- `Features` for new features. +- `Changed` for changes in existing functionality. +- `Fixed` for any bug fixes. +- `Documented` for any changes to the documentation. +- `Breaking` for the detail of any backwards incompatible changes. + +And please only add new entries below the [Unreleased](#unreleased---releasedate) header with the following format: + +```md +**crate or effect scope**: description of change ([#PR]) +``` + + + +## @Unreleased - @ReleaseDate + +🎉🎉🎉 The first version of Ribir. + +![background](https://not.ready/demos.png) + +As the first version, its main content is to verify and stabilize the basic concepts, determine the overall framework process, and make preliminary attempts to verify all core modules. + +We use it in our own projects and have a good experience, and we hope you can also try it out and give us feedback. But it is still in a very rough stage, and be careful to use it in production. + +### Features + +- **core**: control the process of the entire view: compose, build, update, layout and render. + +- **declarative language**: not a new language, but a set of Rust macros that easily interact with Rust. + +- **widgets compose system**: has four kinds of widgets to support you can implement your own widget in different ways: +: function widget, `Compose`, `Render` and `ComposeChild`. So that + - function widget and `Compose`, from other widgets composition. + - `Render`, implement your own layout or rendering logic + - `ComposeChild`, control the compose logic between parent and child widgets, and specify the template of child widgets. + +- **non-intrusive state**: convert your data to a listenable state, and update the view according to the change of the state. + +- **layout system**: learning and inspired by [Flutter] Sublinear layout, but not exactly the same. + +- **event system**: a compose event system, support event bubbling and capture. Support compose to any widget, and exist only if you use it. + +- **theme System**: support full and inherit/partial theme, so you can use it to override or dynamically switch the theme of the subtree. Include: palette, icons, animate transitions, the decoration widget of the widget, etc. In a very rough state and the API will be redesigned soon. + +- **animations**: base on state but no side effect animation, it's almost stable in concept, but not many predefined animations yet. + +- **painter**: convert view to 2d path. + +- **gpu render**: gpu backend for **painter**, do path tessellation, so that easy to render the triangles in any gpu render engine. A `wgpu` implementation is provided as the default gpu render engine. Tessellation base on [lyon]. + +- **Text**: support basic text typography and ime input, in a usable but rough stage. + +- **widgets**: widgets library provide 20+ basic widgets, but all in a rough stage, and the API not stable yet. + +- **examples**: counter, storybook, messages, todos, wordle_game, etc. + +### Documented + +- **introduction**: add `introduction.md` to introduce Ribir and why choose it. +- **get started**: add the `get_started` series of tutorials to help user get started with Ribir. + + +[Flutter]: https://flutter.dev/ +[lyon]: https://github.com/nical/lyon + + + + diff --git a/changelog.config.js b/changelog.config.js index 2afe8d80d..f4fbd08a6 100644 --- a/changelog.config.js +++ b/changelog.config.js @@ -4,11 +4,10 @@ module.exports = { "test", "feat", "fix", - "build", - "ci", + "deps", + "chore", "docs", "refactor", - "release", "perf", "ce" ], @@ -42,15 +41,10 @@ module.exports = { "emoji": "🤖", "value": "chore" }, - "ci": { - "description": "CI related changes", - "emoji": "🎡", - "value": "ci" - }, - "build": { + "deps": { "description": "Changes that affect the build system or external dependencies", "emoji": "🎡", - "value": "build" + "value": "deps" }, "docs": { "description": "Documentation only changes", @@ -77,13 +71,8 @@ module.exports = { "emoji": "💡", "value": "refactor" }, - "release": { - "description": "Create a release commit", - "emoji": "🏹", - "value": "release" - }, "test": { - "description": "Adding missing tests", + "description": "Adding missing tests or correcting existing tests", "emoji": "💍", "value": "test" }, @@ -92,6 +81,5 @@ module.exports = { "emoji": "🔧", "value": "ce" } - } }; \ No newline at end of file diff --git a/docs/en/get_started/ creating_an_application.md b/docs/en/get_started/creating_an_application.md similarity index 91% rename from docs/en/get_started/ creating_an_application.md rename to docs/en/get_started/creating_an_application.md index 7469d0258..d04822b32 100644 --- a/docs/en/get_started/ creating_an_application.md +++ b/docs/en/get_started/creating_an_application.md @@ -30,7 +30,7 @@ Next, edit the `Cargo.toml` file and add Ribir as a dependency: ```toml [dependencies] -ribir = "0.0.1" +ribir = "@RIBIR_VERSION" ``` Or you can directly run `cargo add --git "https://github.com/RibirX/Ribir" ribir` to let Cargo add the latest Ribir version that is under development for you. @@ -68,8 +68,9 @@ cd Ribir/Ribir and run the examples with one of the following commands: ```sh -cargo run -p counter +cargo run -p counter cargo run -p storybook -cargo run -p messages -cargo run -p todos +cargo run -p messages +cargo run -p todos +cargo run -p worle_game ``` \ No newline at end of file diff --git "a/docs/zh/\350\265\267\346\255\245/\345\210\233\345\273\272\344\270\200\344\270\252\345\272\224\347\224\250.md" "b/docs/zh/\350\265\267\346\255\245/\345\210\233\345\273\272\344\270\200\344\270\252\345\272\224\347\224\250.md" index f12496972..6385509e9 100644 --- "a/docs/zh/\350\265\267\346\255\245/\345\210\233\345\273\272\344\270\200\344\270\252\345\272\224\347\224\250.md" +++ "b/docs/zh/\350\265\267\346\255\245/\345\210\233\345\273\272\344\270\200\344\270\252\345\272\224\347\224\250.md" @@ -28,7 +28,7 @@ cd ribir-hello-world ```toml [dependencies] -ribir = "0.0.1" +ribir = "@RIBIR_VERSION" ``` 或者直接运行 `cargo add --git "https://github.com/RibirX/Ribir" ribir` 让 Cargo 为你添加正在开发中的最新 Ribir 版本. @@ -66,9 +66,9 @@ cd Ribir/Ribir 并使用以下命令之一运行示例: ```sh -cargo run -p counter +cargo run -p counter cargo run -p storybook -cargo run -p messages -cargo run -p todos +cargo run -p messages +cargo run -p todos ``` diff --git a/ribir/Cargo.toml b/ribir/Cargo.toml index 3243bdbe0..131b5f600 100644 --- a/ribir/Cargo.toml +++ b/ribir/Cargo.toml @@ -57,3 +57,12 @@ raw-window-handle.workspace = true [package.metadata.release] tag = true +pre-release-replacements = [ + {file="../CHANGELOG.md", search="@Unreleased", replace="{{version}}"}, + {file="../CHANGELOG.md", search="\\.\\.\\.HEAD", replace="...{{tag_name}}", min=0}, + {file="../CHANGELOG.md", search="@ReleaseDate", replace="{{date}}"}, + {file="../CHANGELOG.md", search="", replace="\n\n## [@Unreleased] - @ReleaseDate", exactly=1}, + {file="../CHANGELOG.md", search="", replace="\n[@Unreleased]: https://github.com/RibirX/Ribir/compare/{{tag_name}}...HEAD", exactly=1}, + {file="../docs/zh/起步/创建一个应用.md", search="@RIBIR_VERSION", replace="{{version}}"}, + {file="../docs/en/get_started/creating_an_application.md", search="@RIBIR_VERSION", replace="{{version}}"}, +] \ No newline at end of file