Skip to content

Conversation

@bcdax110
Copy link

@bcdax110 bcdax110 commented May 2, 2025

@bcdax110 bcdax110 changed the title feat: port tab view feature from upstream PRs st3v3nmw/obsidian-spaced-repetition#1169 st3v3nmw/obsidian-spaced-repetition#1233 feat: port tab view feature from upstream PRs May 2, 2025
@bcdax110
Copy link
Author

bcdax110 commented May 2, 2025

If you'd like to try it out before this PR is merged, please replace the corresponding plugin files (main.js and styles.css) in .obsidian/plugins/obsidian-spaced-repetition-recall with those from patch.zip.

@Newdea Newdea enabled auto-merge (squash) May 9, 2025 12:31
@Newdea Newdea disabled auto-merge May 9, 2025 12:36
@Newdea Newdea merged commit f25e66f into open-spaced-repetition:dev-master May 9, 2025
2 of 3 checks passed
Newdea added a commit that referenced this pull request May 10, 2025
Newdea added a commit that referenced this pull request May 10, 2025
@Newdea
Copy link
Collaborator

Newdea commented May 10, 2025

@bcdax110 你好,这个pr还没能实现tab复习卡片,编译报错,希望能补充完善相关文件

@bcdax110
Copy link
Author

bcdax110 commented May 10, 2025

@bcdax110 你好,这个pr还没能实现tab复习卡片,编译报错,希望能补充完善相关文件

@Newdea
是编译 main.js 时候有报错么?我重新 checkout 了版本 #103f25e66f,在删除了之前输出的 build目录和之前下载的node_modules之后重新执行pnpm install pnpm build 之后输出:

    ~/projj/github.com/bcdax110/obsidian-spaced-repetition-recall    dev-master !1 ?5                                                                                                                                                                                                  254 ✘  17:01:07  
❯ pnpm install
Lockfile is up to date, resolution step is skipped
Packages: +799
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

   ╭───────────────────────────────────────────────────────────────────╮
   │                                                                   │
   │                Update available! 9.10.0 → 10.10.0.                │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v10.10.0   │
   │                 Run "pnpm add -g pnpm" to update.                 │
   │                                                                   │
   │         Follow @pnpmjs for updates: https://x.com/pnpmjs          │
   │                                                                   │
   ╰───────────────────────────────────────────────────────────────────╯

Progress: resolved 799, reused 799, downloaded 0, added 799, done

dependencies:
+ chart.js 4.4.4
+ pagerank.js 1.0.2
+ peggy 4.0.3

devDependencies:
+ @popperjs/core 2.11.8
+ @types/jest 29.5.12
+ @types/node 20.16.2
+ @types/vhtml 2.2.9
+ @typescript-eslint/eslint-plugin 6.21.0
+ @typescript-eslint/parser 6.21.0
+ @wdio/cli 9.5.1
+ @wdio/local-runner 9.5.1
+ @wdio/mocha-framework 8.40.3
+ @wdio/spec-reporter 8.40.3
+ auto-changelog 2.4.0
+ builtin-modules 3.3.0
+ chai 4.5.0
+ deepcopy 2.1.0
+ esbuild 0.19.12
+ eslint 8.57.0
+ jest 29.7.0
+ jest-environment-jsdom 29.7.0
+ jest-expect-message 1.1.3
+ moment 2.30.1
+ obsidian 1.6.6
+ prettier 3.3.3
+ ts-fsrs 4.6.1
+ ts-jest 29.2.5
+ tslib 2.6.1
+ typescript 5.1.6
+ vhtml 2.2.0
+ wdio-chromedriver-service 8.1.1

Done in 3.6s

    ~/projj/github.com/bcdax110/obsidian-spaced-repetition-recall    dev-master !1 ?5                                                                                                                                                                                                   4s   17:01:41  
❯ npmp build
zsh: command not found: npmp

    ~/projj/github.com/bcdax110/obsidian-spaced-repetition-recall    dev-master !1 ?5                                                                                                                                                                                                          17:01:46  
❯ pnpm build

> [email protected] build /Users/bcdax110/projj/github.com/bcdax110/obsidian-spaced-repetition-recall
> node esbuild.config.mjs production


    ~/projj/github.com/bcdax110/obsidian-spaced-repetition-recall    dev-master !1 ?5                                                                                                                                                                                                          17:01:53  
❯ pnpm install
Lockfile is up to date, resolution step is skipped
Packages: +799
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 799, reused 799, downloaded 0, added 799, done

dependencies:
+ chart.js 4.4.4
+ pagerank.js 1.0.2
+ peggy 4.0.3

devDependencies:
+ @popperjs/core 2.11.8
+ @types/jest 29.5.12
+ @types/node 20.16.2
+ @types/vhtml 2.2.9
+ @typescript-eslint/eslint-plugin 6.21.0
+ @typescript-eslint/parser 6.21.0
+ @wdio/cli 9.5.1
+ @wdio/local-runner 9.5.1
+ @wdio/mocha-framework 8.40.3
+ @wdio/spec-reporter 8.40.3
+ auto-changelog 2.4.0
+ builtin-modules 3.3.0
+ chai 4.5.0
+ deepcopy 2.1.0
+ esbuild 0.19.12
+ eslint 8.57.0
+ jest 29.7.0
+ jest-environment-jsdom 29.7.0
+ jest-expect-message 1.1.3
+ moment 2.30.1
+ obsidian 1.6.6
+ prettier 3.3.3
+ ts-fsrs 4.6.1
+ ts-jest 29.2.5
+ tslib 2.6.1
+ typescript 5.1.6
+ vhtml 2.2.0
+ wdio-chromedriver-service 8.1.1

Done in 3.7s

    ~/projj/github.com/bcdax110/obsidian-spaced-repetition-recall   @f25e66f4 !1 ?5                                                                                                                                                                                                      4s   17:08:28  
❯ pnpm build

> [email protected] build /Users/bcdax110/projj/github.com/bcdax110/obsidian-spaced-repetition-recall
> node esbuild.config.mjs production

没有看到有报错的地方。

有没有具体的报错信息是什么,可不可以发出来看看,我这边目前没有办法复现。

@bcdax110
Copy link
Author

我也尝试了node esbuild.config.mjs productionnpm run build也没有遇到编译错误

@Newdea
Copy link
Collaborator

Newdea commented May 10, 2025

可能是你环境混乱了吧,我在本地和vscode.dev网页上build 都报错如下

$ npm run build
Debugger attached.

> [email protected] build
> node esbuild.config.mjs production

Debugger attached.
✘ [ERROR] Could not resolve "src/gui/TabViewManager"

    src/main.ts:71:27:
      71 │ import TabViewManager from "src/gui/TabViewManager";
         ╵                            ~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "src/gui/TabViewManager" as external to exclude it from the bundle, which
  will remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "src/gui/TabView"

    src/main.ts:72:24:
      72 │ import { TabView } from "src/gui/TabView";
         ╵                         ~~~~~~~~~~~~~~~~~

  You can mark the path "src/gui/TabView" as external to exclude it from the bundle, which will
  remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "./DeckUI"

    src/gui/FlashcardModal.tsx:15:23:
      15 │ import { DeckUI } from "./DeckUI";
         ╵                        ~~~~~~~~~~

✘ [ERROR] Could not resolve "./CardUI"

    src/gui/FlashcardModal.tsx:16:23:
      16 │ import { CardUI } from "./CardUI";
         ╵                        ~~~~~~~~~~

4 errors
Waiting for the debugger to disconnect...

@bcdax110
Copy link
Author

bcdax110 commented May 10, 2025

可能是你环境混乱了吧,我在本地和vscode.dev网页上build 都报错如下

$ npm run build
Debugger attached.

> [email protected] build
> node esbuild.config.mjs production

Debugger attached.
✘ [ERROR] Could not resolve "src/gui/TabViewManager"

    src/main.ts:71:27:
      71 │ import TabViewManager from "src/gui/TabViewManager";
         ╵                            ~~~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "src/gui/TabViewManager" as external to exclude it from the bundle, which
  will remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "src/gui/TabView"

    src/main.ts:72:24:
      72 │ import { TabView } from "src/gui/TabView";
         ╵                         ~~~~~~~~~~~~~~~~~

  You can mark the path "src/gui/TabView" as external to exclude it from the bundle, which will
  remove this error and leave the unresolved path in the bundle.

✘ [ERROR] Could not resolve "./DeckUI"

    src/gui/FlashcardModal.tsx:15:23:
      15 │ import { DeckUI } from "./DeckUI";
         ╵                        ~~~~~~~~~~

✘ [ERROR] Could not resolve "./CardUI"

    src/gui/FlashcardModal.tsx:16:23:
      16 │ import { CardUI } from "./CardUI";
         ╵                        ~~~~~~~~~~

4 errors
Waiting for the debugger to disconnect...

我好像搞清楚什么问题了,我在之前 commit 的时候 IDE 出 bug 了,添加到 change 之后自己变成 unversioned 了,有点尴尬,我这就把这几个文件推上去。

@Newdea
Copy link
Collaborator

Newdea commented May 10, 2025

嗯,我也在尝试合并主分支最新版了,但冲突太多,不好处理😮‍💨

@bcdax110
Copy link
Author

嗯,我也在尝试合并主分支最新版了,但冲突太多,不好处理😮‍💨

我把没有进到版本管理的文件加进去了,重新提了 PR #105 ,我这次在别的目录重新克隆的 frok 仓库尝试了一下,应该不会有缺失的文件了。

感觉上游的变动还是得把 PR 一部分一部分的重新加进去,合并是没发合并了。

Newdea pushed a commit that referenced this pull request May 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants