From 81fd9490163b8cf9a643eaf658e0f4a3ba46c431 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 25 Oct 2024 08:48:52 +0800 Subject: [PATCH] chore: add discussion template --- .github/DISCUSSION_TEMPLATE/1-q-a.yml | 54 +++++++++++++++++++ .github/ISSUE_TEMPLATE/bug.yml | 23 ++++---- .github/ISSUE_TEMPLATE/config.yml | 6 +-- .github/ISSUE_TEMPLATE/feature.yml | 2 +- .github/workflows/lock.yml | 2 +- Cargo.lock | 78 ++++++++++++++------------- Cargo.toml | 10 ++-- yazi-boot/Cargo.toml | 2 +- yazi-cli/Cargo.toml | 2 +- yazi-codegen/Cargo.toml | 2 +- yazi-config/src/pattern.rs | 14 ++--- yazi-plugin/src/fs/fs.rs | 2 +- 12 files changed, 130 insertions(+), 67 deletions(-) create mode 100644 .github/DISCUSSION_TEMPLATE/1-q-a.yml diff --git a/.github/DISCUSSION_TEMPLATE/1-q-a.yml b/.github/DISCUSSION_TEMPLATE/1-q-a.yml new file mode 100644 index 00000000..580387fc --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/1-q-a.yml @@ -0,0 +1,54 @@ +body: + - type: dropdown + id: os + attributes: + label: What system are you running Yazi on? + options: + - Linux X11 + - Linux Wayland + - macOS + - Windows + - Windows WSL + - FreeBSD X11 + - FreeBSD Wayland + - Android + validations: + required: true + - type: input + id: terminal + attributes: + label: What terminal are you running Yazi in? + placeholder: "ex: kitty v0.32.2" + validations: + required: true + - type: textarea + id: debug + attributes: + label: "`yazi --debug` output" + description: Please run `yazi --debug` and paste the debug information here. + render: Shell + validations: + required: true + - type: textarea + id: description + attributes: + label: Describe the question + description: A clear and concise description of what the question is + placeholder: Tell us what you want to know + validations: + required: true + - type: textarea + id: other + attributes: + label: Anything else? + description: | + Add any other context about the problem here. You can attach screenshots by clicking + this area to highlight it and then drag the files in. + - type: checkboxes + id: validations + attributes: + label: Validations + description: Before submitting the issue, please make sure you have completed the following + options: + - label: I have searched the existing discussions/issues + required: true diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index a4a16578..6aeaede8 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -15,6 +15,7 @@ body: - Windows WSL - FreeBSD X11 - FreeBSD Wayland + - Android validations: required: true - type: input @@ -32,15 +33,6 @@ body: render: Shell validations: required: true - - type: dropdown - id: tried_main - attributes: - label: Did you try the latest nightly build to see if the problem got fixed? - options: - - Yes, and I updated the debug information above (`yazi --debug`) to the nightly that I tried - - No, and I'll explain why below - validations: - required: true - type: textarea id: description attributes: @@ -52,7 +44,7 @@ body: - type: textarea id: reproducer attributes: - label: Minimal reproducer + label: Minimal reproducer description: A [minimal reproducer](https://stackoverflow.com/help/minimal-reproducible-example) is required, otherwise the issue might be closed without further notice. placeholder: | Please include as much information as possible that can help to reproduce and understand the issue. @@ -65,3 +57,14 @@ body: description: | Add any other context about the problem here. You can attach screenshots by clicking this area to highlight it and then drag the files in. + - type: checkboxes + id: validations + attributes: + label: Validations + description: Before submitting the issue, please make sure you have completed the following + options: + - label: I tried the [latest nightly build](https://yazi-rs.github.io/docs/installation#official-binaries), and the issue is still reproducible + required: true + - label: I updated the debug information (`yazi --debug`) input box to the nightly that I tried + required: true + - label: I can reproduce it after disabling all custom configs/plugins (`mv ~/.config/yazi ~/.config/yazi-backup`) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 9976ab8a..84145ce7 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,9 +3,9 @@ contact_links: - name: 📝 Documentation Improvement url: https://github.com/yazi-rs/yazi-rs.github.io about: If you'd like to help improve the documentation + - name: 💬 GitHub Discussions + url: https://github.com/sxyazi/yazi/discussions/new?category=1-q-a + about: When you have questions that are not bug reports or feature requests - name: 🌐 Discord Server / Telegram Group url: https://github.com/sxyazi/yazi#discussion about: If you'd prefer more realtime conversation with the community - - name: 💬 GitHub Discussions - url: https://github.com/sxyazi/yazi/discussions - about: When you have questions that are not bug reports or feature requests diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml index 1ac3a36e..478f0667 100644 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -45,5 +45,5 @@ body: options: - label: I have searched the existing issues/discussions required: true - - label: The latest nightly build of Yazi doesn't already have this feature + - label: The [latest nightly build](https://yazi-rs.github.io/docs/installation/#official-binaries) doesn't already have this feature required: true diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 261c8988..9d0819fe 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -23,7 +23,7 @@ jobs: I'm going to lock this issue because it has been closed for _30 days_. ⏳ This helps our maintainers find and focus on the active issues. - If you have found a problem that seems similar to this, please open a new + If you have found a problem that seems similar to this, please file a new issue and complete the issue template so we can capture all the details necessary to investigate further. pr-inactive-days: "30" diff --git a/Cargo.lock b/Cargo.lock index ab365154..6af3be00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "ansi-to-tui" -version = "6.0.0" +version = "6.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c4af0bef1b514c9b6a32a773caf604c1390fa7913f4eaa23bfe76f251d6a42" +checksum = "cd01ee70df708c9ecb68705af08cee6fe85493992a7e205c52ddbe569314ba47" dependencies = [ "nom", "ratatui", @@ -147,7 +147,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -400,9 +400,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.33" +version = "4.5.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9646e2e245bf62f45d39a0f3f36f1171ad1ea0d6967fd114bca72cb02a8fcdfb" +checksum = "07a13ab5b8cb13dbe35e68b83f6c12f9293b2f601797b71bc9f23befdb329feb" dependencies = [ "clap", ] @@ -436,7 +436,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -615,7 +615,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -626,7 +626,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -656,7 +656,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -666,7 +666,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -918,7 +918,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1164,7 +1164,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b23a0c8dfe501baac4adf6ebbfa6eddf8f0c07f56b058cc1288017e32397846c" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1184,7 +1184,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1472,7 +1472,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1559,7 +1559,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1841,7 +1841,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a65f2e60fbf1063868558d69c6beacf412dc755f9fc020f514b7955fc914fe30" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -1925,7 +1925,7 @@ dependencies = [ "strum_macros", "unicode-segmentation", "unicode-truncate", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] @@ -2019,9 +2019,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2131,7 +2131,7 @@ checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2304,7 +2304,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2319,9 +2319,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56" dependencies = [ "proc-macro2", "quote", @@ -2385,7 +2385,7 @@ checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2492,7 +2492,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2585,7 +2585,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2687,7 +2687,7 @@ checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ "itertools 0.13.0", "unicode-segmentation", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] @@ -2696,6 +2696,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "url" version = "2.5.2" @@ -2767,7 +2773,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2864,7 +2870,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "wasm-bindgen-shared", ] @@ -2886,7 +2892,7 @@ checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2985,7 +2991,7 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -2996,7 +3002,7 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3236,7 +3242,7 @@ name = "yazi-codegen" version = "0.3.3" dependencies = [ "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] @@ -3277,7 +3283,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tracing", - "unicode-width", + "unicode-width 0.2.0", "yazi-adapter", "yazi-boot", "yazi-codegen", @@ -3384,7 +3390,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tracing", - "unicode-width", + "unicode-width 0.2.0", "uzers", "yazi-adapter", "yazi-boot", @@ -3476,7 +3482,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.82", + "syn 2.0.85", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 50d81822..f6924b2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ strip = true [workspace.dependencies] ansi-to-tui = "6.0.0" -anyhow = "1.0.90" +anyhow = "1.0.91" arc-swap = "1.7.1" base64 = "0.22.1" bitflags = "2.6.0" @@ -25,14 +25,14 @@ md-5 = "0.10.6" mlua = { version = "0.9.9", features = [ "lua54", "serialize", "macros", "async" ] } parking_lot = "0.12.3" ratatui = { version = "0.28.1", features = [ "unstable-rendered-line-info" ] } -regex = "1.11.0" +regex = "1.11.1" scopeguard = "1.2.0" -serde = { version = "1.0.210", features = [ "derive" ] } +serde = { version = "1.0.213", features = [ "derive" ] } serde_json = "1.0.132" shell-words = "1.1.0" -tokio = { version = "1.40.0", features = [ "full" ] } +tokio = { version = "1.41.0", features = [ "full" ] } tokio-stream = "0.1.16" tokio-util = "0.7.12" tracing = { version = "0.1.40", features = [ "max_level_debug", "release_max_level_warn" ] } -unicode-width = "0.1.14" +unicode-width = "0.2.0" uzers = "0.12.1" diff --git a/yazi-boot/Cargo.toml b/yazi-boot/Cargo.toml index ff3ee1e3..837b2ef4 100644 --- a/yazi-boot/Cargo.toml +++ b/yazi-boot/Cargo.toml @@ -21,7 +21,7 @@ serde = { workspace = true } [build-dependencies] clap = { workspace = true } -clap_complete = "4.5.33" +clap_complete = "4.5.35" clap_complete_fig = "4.5.2" clap_complete_nushell = "4.5.4" vergen-gitcl = { version = "1.0.1", features = [ "build" ] } diff --git a/yazi-cli/Cargo.toml b/yazi-cli/Cargo.toml index 1258094f..302d567b 100644 --- a/yazi-cli/Cargo.toml +++ b/yazi-cli/Cargo.toml @@ -27,7 +27,7 @@ toml_edit = "0.22.22" # External build dependencies anyhow = { workspace = true } clap = { workspace = true } -clap_complete = "4.5.33" +clap_complete = "4.5.35" clap_complete_fig = "4.5.2" clap_complete_nushell = "4.5.4" serde_json = { workspace = true } diff --git a/yazi-codegen/Cargo.toml b/yazi-codegen/Cargo.toml index f0028f74..c22fef5f 100644 --- a/yazi-codegen/Cargo.toml +++ b/yazi-codegen/Cargo.toml @@ -13,5 +13,5 @@ proc-macro = true [dependencies] # External dependencies -syn = "2.0.82" +syn = "2.0.85" quote = "1.0.37" diff --git a/yazi-config/src/pattern.rs b/yazi-config/src/pattern.rs index 3ca5823a..44ca368c 100644 --- a/yazi-config/src/pattern.rs +++ b/yazi-config/src/pattern.rs @@ -1,4 +1,4 @@ -use std::path::Path; +use std::{path::Path, str::FromStr}; use globset::GlobBuilder; use serde::Deserialize; @@ -29,16 +29,16 @@ impl Pattern { pub fn any_dir(&self) -> bool { self.is_star && self.is_dir } } -impl TryFrom<&str> for Pattern { - type Error = anyhow::Error; +impl FromStr for Pattern { + type Err = globset::Error; - fn try_from(s: &str) -> Result { + fn from_str(s: &str) -> Result { let a = s.trim_start_matches("\\s"); let b = a.trim_end_matches('/'); let inner = GlobBuilder::new(b) .case_insensitive(a.len() == s.len()) - .literal_separator(false) + .literal_separator(true) .backslash_escape(false) .empty_alternates(true) .build()? @@ -49,7 +49,7 @@ impl TryFrom<&str> for Pattern { } impl TryFrom for Pattern { - type Error = anyhow::Error; + type Error = globset::Error; - fn try_from(s: String) -> Result { Self::try_from(s.as_str()) } + fn try_from(s: String) -> Result { Self::from_str(s.as_str()) } } diff --git a/yazi-plugin/src/fs/fs.rs b/yazi-plugin/src/fs/fs.rs index fed446ad..4af0c360 100644 --- a/yazi-plugin/src/fs/fs.rs +++ b/yazi-plugin/src/fs/fs.rs @@ -59,7 +59,7 @@ pub fn install(lua: &Lua) -> mlua::Result<()> { Some( GlobBuilder::new(s.to_str()?) .case_insensitive(true) - .literal_separator(false) + .literal_separator(true) .backslash_escape(false) .empty_alternates(true) .build()