Tauri 社区增长与反馈

Tauri 在过去的一年里取得了令人惊叹的成绩。我们发布了 Tauri 1.0,宣布了 Tauri Mobile 的 alpha 版本,并在 2022 年 Tauri 社区调查中收集了来自我们的社区和用户的大量宝贵反馈。
🌐 Tauri has had an amazing past year. We launched Tauri 1.0, announced the alpha version of Tauri Mobile and gathered a lot of valuable feedback from our community and users in the 2022 Tauri Community Survey.
🌐 Tauri Community Survey Results
今年,我们收到了超过600份Tauri社区调查的回复(比上一次调查的回复多了3倍以上)。我们想向吴宇伟和廖DK表示特别的感谢,感谢他们将调查问卷从英文翻译成简体和繁体中文,以便我们能够让社区中更多的人参与并获得他们的反馈。你可以在这里下载调查的公开数据。
🌐 This year, we had over 600 responses to the Tauri Community Survey (over 3x more than the previous survey’s responses). We’d like to extend a very special thank you to Wu Yu Wei and DK Liao for translating the survey from English into Simplified and Traditional Chinese so that we could include more people from the community and their feedback in the survey. You can download the public data for the survey here.
我们已经听取了你的反馈,并已启动了几项项目来直接应对这些问题。我们想首先谈论的一个是搜索。
🌐 We’ve heard your feedback and have started a couple of projects to directly address it. The first one we’d like to talk about is search.
🌐 Search Improvements on Tauri.app
不经过搜索,你能找到什么吗?如果你的望远镜有裂缝,你还能看到行星或星星吗?我们知道我们的搜索镜片又脏又划痕;有时候感觉就像掷骰子一样,有些人甚至求助于使用 ChatGPT 来寻找答案。
🌐 Without searching, can you ever find something? And if your telescope is cracked, can you see the planets or stars? We know that our search lens was dusty and scratched; it felt sometimes like a roll of the dice, and some folks even resorted to using ChatGPT to find answers.
搜索一直是我们多年来尝试过的一个项目,但我们也了解到,它并不像最初看起来那么容易。Tauri工作组的Ken在之前的tauri-search项目中做了鼓舞人心的工作。他为我们在之前的项目中建立了大量基础和研究,以便我们理解搜索所涉及的内容。
🌐 Search has been a project that we’ve taken a few runs at over the years, but we’ve also learned that it’s not quite as easy as it first seems. Ken from the Tauri Working Group did inspirational work with the previous tauri-search project. He created a lot of the foundation and research in the previous project for us to understand what goes into search.
在下一次搜索迭代中,我们有三个目标:
🌐 With the next iteration of search, we had three goals in mind:
- 保持可维护性
- 保持运作
- 保持开源
🌐 Search Engine
首先,我们需要选择一个后端搜索引擎来存储和提供搜索索引。在评估搜索引擎时,我们希望确保使用的东西符合我们对开源软件和小型占用的价值观。在比较和研究搜索市场的参与者(并从我们之前使用 Meilisearch 的方法中学习)之后,我们决定选择 Meilisearch,因为我们知道它符合这两个目标。
🌐 First, we needed to choose a backend search engine to store and serve the search index. When evaluating search engines, we wanted to make sure we used something that shared our values of open source software and a small footprint. After comparing and researching players in the search market (and also learning from our previous approach with Meilisearch), we decided on Meilisearch because we knew it fit both of those goals.
Meilisearch 对开源软件充满热情,甚至还拥有他们用 Rust 构建的搜索引擎,它具有极小的占用空间和出色的性能。他们 最近宣布了 Meilisearch 1.0,现在还为那些希望使用托管实例的用户提供了云服务。
我们决定与 Meilisearch 合作,使用他们的引擎和 Meilisearch Cloud 服务来托管我们的搜索引擎。他们慷慨地赞助了一个由他们为我们管理的托管计划。这让我们可以专注于构建 Tauri,同时知道搜索引擎的维护和保养都交给了可信赖的团队。
🌐 We decided to partner up with Meilisearch to use their engine and their Meilisearch Cloud offering to host our search engine. They graciously sponsored a hosted plan that they manage for us. This lets us focus on building Tauri, knowing that the maintenance and upkeep of the search engine are in trusted hands.
🌐 Search Ingestion & Indexing
拼图的下一步是将内容实际编入索引并导入搜索引擎。Tauri 工作组的 Fabian 使用 Meilisearch 的 docs-scraper 项目搭建了该项目。
🌐 The next piece of the puzzle is to actually get the content indexed and ingested into the search engine. Fabian from the Tauri Working Group set up the project using the docs-scraper project from Meilisearch.
以前,我们有一个设置,它会将我们的 Markdown 文档和 JavaScript AST 用于构建搜索索引。虽然这大大加快了索引时间,但也意味着搜索索引与我们网站内容的渲染方式之间存在紧密耦合的依赖。这有时会导致搜索结果与网站上的实时内容不同步。为了更新网站或优化索引器,某人需要同时了解两者,这使得维护变得更加困难。
🌐 Previously, we had a setup that would take our markdown documentation and JavaScript AST and use that to build the search index. Although it led to much faster indexing times, it meant we had a tightly coupled dependency between search indexing and the way we rendered content on our website. This would sometimes lead to the search results getting out of sync with the content on the live website. In order to update the website or optimize the indexer, someone would need to have knowledge of both, making it more difficult to maintain.
使用当前版本的爬虫,我们可以通过一个 JSON 文件 处理所有的配置和结果调整,其余的由爬虫自动补齐。我们设置了一个 GitHub 动作,将爬取操作作为我们 CI/CD 流水线的一部分,然后将这些结果发送到我们的 Meilisearch Cloud 实例。
🌐 With the current version of the scraper, we can handle all of the configuration and tweaking of results with a single JSON file and let the scraper take care of the rest. We set up a GitHub action that would perform the scraping as part of our CI/CD pipeline and then send those results to our Meilisearch Cloud instance.
🌐 Search Frontend
最后一步是创建访问 tauri.app 的用户将与之交互的前端用户界面。来自 Tauri 工作组的 Amr 创建了 meilisearch-docsearch 项目来帮助实现这一点。该仓库与 Meilisearch 1.0 兼容(我们现在正在 tauri.app 上使用它)。
🌐 The final step was to create the frontend UI that people visiting tauri.app would interact with. Amr from the Tauri Working Group created the meilisearch-docsearch project to help with this. This repo is compatible with Meilisearch 1.0 (we’re using it now on tauri.app).
它的灵感来自 algolia/docsearch 和 meilisearch/docs-searchbar.js 项目,它们提供了一个非常坚实的起点。开源的美妙之处在于,我们可以相互学习,并利用这些知识回馈生态系统。
🌐 It’s inspired by the algolia/docsearch and meilisearch/docs-searchbar.js projects that provided a very solid foundation to begin with. The beauty of open source is that we can learn from each other and use that to give back to the ecosystem.
为了讨论一些细节,我把时间交给阿姆尔:
🌐 To talk through some of the details, I’ll hand it over to Amr:
meilisearch/docs-searchbar.js 项目很好,但我一直觉得它可以进行一些改进,以实现与 algolia/docsearch 的功能平等。我也觉得我们可以帮助更新,以改善用户界面和用户体验。
🌐 The meilisearch/docs-searchbar.js project was good, but I always felt it could use some improvements to get feature parity with algolia/docsearch. I also felt we could help with an update to help with UI/UX.
meilisearch/docs-searchbar.js 的主要痛点是:
🌐 The main pain points with meilisearch/docs-searchbar.js were:
- 在移动屏幕上,它需要进行UI/UX改进,以便搜索结果不会超出屏幕。
- 在桌面上,搜索结果通常会出现在搜索输入框下方,而在 tauri.app 的情况下,搜索框被放置在右上角。这导致了糟糕的用户体验,因为你不得不不断在页面中间的内容和右上角的搜索结果之间移动视线。
- 它缺少一个常用的快捷键。
ctrl/command + K用于开始搜索,ctrl/command + K在 JS 生态系统的文档网站中相当常见。它也没有从页面上选择文本然后直接触发搜索的功能。
我一直是 algolia/docsearch UI/UX 的忠实粉丝。它满足了我清单上的所有功能,我一直希望能把它用到 tauri.app 上。事实上,几个月前,我尝试修改我们这边的 meilisearch/docs-searchbar.js CSS 来改进上面提到的第1点和第2点,但我半途而废了,因为在现有CSS基础上进行构建并争夺最高优先级的难度很大(而且CSS本身就很难 😉)。其他项目也无法轻松地从我们的修改中受益。
🌐 I have been always a big fan of algolia/docsearch UI/UX. It checked all the features on my list, and I always wanted to have that for tauri.app. In fact, several months ago, I tried to change the meilisearch/docs-searchbar.js CSS on our end to improve point 1 and 2 above but I stopped mid-way because of the difficulty of building on top of existing css and fighting for highest specifity (plus CSS is hard :wink:). Other projects also couldn’t benefit from our modifications in an easy way.
后来,我们讨论了如何改进搜索的用户界面 (UI) 和用户体验 (UX),并决定可以在基础的 Meilisearch UI 上进行改进。该项目变成了 meilisearch-docsearch。
🌐 Later, we were discussing how to improve the search UI and UX, and we decided that we could improve on the base Meilisearch UI. That project turned into meilisearch-docsearch.
🌐 Seeing It In Action
好消息是,所有这些更改都已上线!你可以在 tauri.app 上看到新的搜索功能。我们很希望听到你对哪些地方运作良好以及哪些地方需要改进的反馈,请在 本博客文章的 GitHub 讨论区 留言。我们邀请你不仅报告错误,还可以反馈如果你的搜索结果不符合预期或应该排在结果列表的更前面。
🌐 The good news is that all of these changes are live! You can see the new search on tauri.app. We’d love to hear your feedback on what works and what could use improvement in the GitHub Discussion for this blog post. We invite you to not only report bugs, but also if your search result wasn’t expected or should be higher up on the list of results.

我们想在结束时特别感谢 Ken 为最初的 Tauri Search 项目作出的贡献,Amr 为 meilisearch-docsearch 项目作出的贡献,Fabian 为编写修订后的索引抓取器和持续测试所作的努力,Meilisearch 及其合作伙伴关系和 Meilisearch Cloud 实例,最后还要感谢 Tauri 社区持续的反馈,帮助我们推动 Tauri 和社区的发展。
🌐 We’d like to wrap up by extending a special thank you to Ken for the original Tauri Search project, Amr for the meilisearch-docsearch project, Fabian for writing the revised index scraper and continuous testing, Meilisearch for their partnership and the Meilisearch Cloud instance and finally the Tauri community for their continual feedback to help us drive Tauri and the community forward.
🌐 Next Steps
在接下来的一年里,Tauri 工作组非常期待继续努力推进 Tauri 2.0。我们还有一个网站重写项目正在进行中,我们将在今年春季推出测试版。如果你想参与其中,可以通过 Tauri Discord 联系我们,并关注我们的 Mastodon 和 Twitter 账号。
🌐 Over the next year, the Tauri Working Group is excited to continue working towards Tauri 2.0. We also have a website rewrite in the works that we’ll be launching in beta this spring. If you’d like to get involved, you can reach out to us in the Tauri Discord and follow us on Mastodon and Twitter.
Tauri 中文网 - 粤ICP备13048890号
Nodejs.cn 旗下网站