chafan-dev / chafan-pwa Goto Github PK
View Code? Open in Web Editor NEWPWA for Chafan
Home Page: https://cha.fan
License: Apache License 2.0
PWA for Chafan
Home Page: https://cha.fan
License: Apache License 2.0
Currently replacing a
with RouterLink
without other changes are introducing many silent bugs. The root cause is that currently the component is not fully reactive w.r.t. the params.
API definitions: src/interfaces/index.ts
https://cha.fan/invitation-links/
目前是当前窗口跳转的,但是该邀请码展示页面没有任何的回退按钮
A. 跳转到新标签页
B. 弹出对话框动态生成
C. 添加回退按钮
例如:
这里的链接前面多了一个 /
,点击后访问到了 cha.fan/https://github.com/xxx ,最终会跳转到网站首页。
似乎是这里的问题: https://github.com/chafan-dev/chafan-frontend/blob/master/src/views/main/Submission.vue#L39
(应该是 SubmissionCard 里的 RouterLink 问题
v1 (deprecated): I used v-html and a very simple replace
based translator -- which is fundamentally broken.
v2 (current): Now I try to reuse the vditor (as in SimpleEditor/SimpleViewer
), but it is hard to cut down its features that are not wanted in a lightweight input box.
I can't find good open-source implementation of similar feature, so I tried the two approaches above. But apparently they are not ideal.
NARROW_FEED_UI_KEY
and update it similarly to readNarrowUI
and commitSetNarrowUI
只有首页能正常显示,其他页面都是 404
本地测试用户也无法创建圈子等
@lynzrand Currently, if you run on the latest codebase:
$ yarn run eslint src/components/NewInviteLinkBtn.vue
0:0 error Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: src/components/NewInviteLinkBtn.vue.
The extension for the file (.vue) is non-standard. You should add "parserOptions.extraFileExtensions" to your config
I tried to add the parserOptions.extraFileExtensions
as suggested
diff --git a/.eslintrc.js b/.eslintrc.js
index e51111a..6e479af 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -27,6 +27,7 @@ module.exports = {
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
+ extraFileExtensions: ['.vue']
},
plugins: ['@typescript-eslint'],
rules: {
but then rerun the same check will throw:
/Users/zhen/projects/apps/chafan-frontend/src/components/NewInviteLinkBtn.vue
3:6 error Parsing error: '>' expected
不知道现在的 project 哪里是最好的拓展 v-card CSS 属性的方法?
目前存在有很多地方作为基底样式(<div> <v-sheet>
)的地方使用 来布局。
这样会导致内部可能无法与整体布局对其,无法直接覆写 vuetify vCard 内部样式(会因为以上情况导致样式重复应用) #26
清理代码并用 <v-sheet>
来替换。
Currently this is handled by reading a localStorage
flag set from CreateQuestionForm.vue/CreateSubmissionForm.vue.
This might be confusing to user -- since we are reusing the same logic when user actively tried to update an existing question/submission.
Extending on top of https://github.com/chafan-dev/chafan-frontend/blob/master/e2e_tests/selenium_driver.js
We need to add this to CI one day as well.
is_placed_at_site_top
Currently, most of the API use are wrapped inside dispatchCaptureApiError
or dispatchCaptureApiErrorWithErrorHandler
to handle the erroneous cases when the API server is timing out, failing, or returning non-200 responses.
目前的 vditor 是选用了多个现成的解决方案后的折中结果。但是 vditor 本身有很多行为无法定制(以至于现在我们用的是我改了代码的 fork),整体上的美观和方便程度和一流的编辑器/渲染器体验仍相差甚远(比较对象:知乎,medium,notion 等)。
但是无论做何改进,最重要的需要保持的特点是源格式为 Markdown-based。
目前默认头像是根据用户名等信息计算出来的,有的时候甚至为空,就是一个蓝方块。
可以像 Github 一样生成随机头像,或者设计一个原创吉祥物.........
可以输出成单独的文件或者包含在某个页面里
目前有大量的组件代码重复,例如各种 <CardComponent>
。
创建 base
组件来提供统一的布局/样式,然后供给其他组件应用。
<template>
<v-card v-bind="$attrs">
<slot />
</v-card>
</template>
<script>
export default {
name: "BaseCard"
};
</script>
https://github.com/chafan-dev/chafan-frontend/blob/master/src/views/main/Main.vue#L460
当时不用可选链的话,会提示 typescript 类型可能为 null 无法链接到下一个 key,但是增加可选链之后链接就自动变为 undefined
Also need a help dialog for these
https://iconpark.bytedance.com
iconify
有一些按钮的图形不能很好地暗示功能,也许增加一些悬浮说明更好。
期望改进的例子:
期望达到的效果:
Does it conflict with ESLint/TSLint?
This is what I tried:
Not really useful.
(思源黑体配的 Source Sans 不好看,要不要把英文字体换成 Inter
(Inter 可以考虑用可变字体减小大小,思源在 google fonts 上应该是可以按需加载的
(啊 两个应该都在 google fonts 上有,另外 google fonts 有一个国内可用的反代:fonts.loli.net
目前大多数内容已经组件化,不过需要进一步抽象;还需要加入一个 persistent state 记录用户的主题偏好(类似 LangPicker)
For video content preview from well-knowns platforms
https://developers.google.com/speed/pagespeed/insights/?url=cha.fan&tab=mobile&hl=en
We need to know why and how to address the issue
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.