antvis / gatsby-theme-antv

⚛️ Polished Gatsby theme for documentation site
https://gatsby-starter-theme-antv.antv.vision/zh
Other
344 stars 57 forks source link

fix: fix default demo error #381

Closed Eve-Sama closed 2 years ago

Eve-Sama commented 2 years ago

问题的来源是G2Plot关于双轴图的一个demo链接打开错误 图片

点击demo会跳转到https://g2plot.antv.vision/zh/examples/dual-axes/dual-line 这个链接打开, 理论上应该是打开双轴图的, 实际打开的却是面积图. 对比了下其他的demo链接, 发现是少了哈希路由参数 正确的应该是https://g2plot.antv.vision/zh/examples/dual-axes/dual-line#dual-line

本来是想修改文档链接的, 但是我发现这种不带哈希的路由有好多地方在使用, 不止是G2Plot, 很多antv系列产品都在使用. 我怀疑最早的时候是支持不带哈希路由的, 不带哈希路由的情况下, 应该是默认读取这个类别的第一个demo才是. 而不是随便找个图表类型.

github-actions[bot] commented 2 years ago

🎊 PR Preview has been successfully built and deployed to https://gatsby-theme-preview-pr-381.surge.sh

Eve-Sama commented 2 years ago

G2: right: https://g2.antv.vision/zh/examples/case/line#line6 error: https://g2.antv.vision/zh/examples/case/line

G2Plot right: https://g2plot.antv.vision/zh/examples/dual-axes/dual-line#dual-line error: https://g2plot.antv.vision/zh/examples/dual-axes/dual-line

X6: right: https://x6.antv.vision/zh/examples/showcase/practices#flowchart error: https://x6.antv.vision/zh/examples/showcase/practices

在众多antv产品中均可复现, 因为都是使用的这个仓库进行构建的.

Eve-Sama commented 2 years ago

更多思路请看这篇掘金文章

visiky commented 2 years ago

@ai-qing-hai 确认下是不是加侧边导航栏功能之前,examples代表的就是当前分类下的所有examples,加了功能之后,examples 含义就变了

xingwanying commented 2 years ago

2022年见过的最感人的pr

afc163 commented 2 years ago

感觉是这里改挂了 https://github.com/antvis/gatsby-theme-antv/pull/336/files#diff-d0c81774efcecd93e880ea325537ae48f5b88d38aea96e7701d79df33f1f6514R100

@visiky

visiky commented 2 years ago

感觉是这里改挂了 https://github.com/antvis/gatsby-theme-antv/pull/336/files#diff-d0c81774efcecd93e880ea325537ae48f5b88d38aea96e7701d79df33f1f6514R100

@visiky

https://github.com/antvis/gatsby-theme-antv/pull/335 盲猜:这个需求,没有考虑到可以不需要 hash 值。加侧边导航栏功能之前,examples代表的就是当前分类下的所有examples,加了功能之后,examples 含义就变了