feat: add histoire #2724

Merged
konrad merged 4 commits from dpschen/frontend:feature/add-histoire into main 2023-01-06 09:27:11 +00:00
Member
No description provided.
dpschen added the
kind/feature
label 2022-11-17 16:05:55 +00:00
dpschen added 1 commit 2022-11-17 16:05:57 +00:00
continuous-integration/drone/pr Build is failing Details
5d7297a37b
feat: add histoire
dpschen added 1 commit 2022-11-18 11:49:20 +00:00
dpschen force-pushed feature/add-histoire from fb4f2ce92b to da05a34a2a 2022-11-21 17:52:48 +00:00 Compare
dpschen force-pushed feature/add-histoire from da05a34a2a to 229de995d9 2023-01-02 17:46:09 +00:00 Compare
dpschen force-pushed feature/add-histoire from 229de995d9 to 7fda4a4a08 2023-01-03 14:48:15 +00:00 Compare
dpschen changed title from WIP: feat: add histoire to feat: add histoire 2023-01-03 15:01:01 +00:00
konrad was assigned by dpschen 2023-01-03 15:01:05 +00:00
dpschen requested review from konrad 2023-01-03 15:01:12 +00:00
Member

Hi dpschen!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://2724-feature-add-histoire--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi dpschen! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://2724-feature-add-histoire--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
konrad reviewed 2023-01-03 17:14:30 +00:00
@ -0,0 +9,4 @@
app.use(createRouter({
history: createMemoryHistory(),
routes: [
{ path: '/', name: 'home', component: { render: () => null } },

Do we need this in every story?

Do we need this in every story?
Author
Member

Only where wewant to use the router. It can also be done in the global setup. I didn't want to do this so that we also have the option to test components without router. Could be abstracted into a function if we want to reuse it in other component stories later. But as of now it's only used here.

Only where wewant to use the router. It can also be done in the global setup. I didn't want to do this so that we also have the option to test components without router. Could be abstracted into a function if we want to reuse it in other component stories later. But as of now it's only used here.

Yeah makes sense. Let's keep it like this for now and abstract it out if needed in more than one place.

Yeah makes sense. Let's keep it like this for now and abstract it out if needed in more than one place.
Author
Member

To be clear: we create here mock targets for the router.

To be clear: we create here mock targets for the router.
konrad marked this conversation as resolved
Owner

I wasn't able to run histore:

$ pnpm story:dev

> vikunja-frontend@0.10.0 story:dev /home/konrad/www/vikunja/frontend
> histoire dev

Building "legacy" build with "@vitejs/plugin-legacy"
Building "legacy" build with "@vitejs/plugin-legacy"
file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70
        throw new Error(`No support plugin found for file ${absoluteFilePath}`);
              ^

Error: No support plugin found for file /home/konrad/www/vikunja/frontend/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa
    at addStory (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70:15)
    at FSWatcher.<anonymous> (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:41:27)
    at FSWatcher.emit (node:events:513:28)
    at FSWatcher.emitWithAll (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:540:8)
    at FSWatcher._emit (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:632:8)
    at NodeFsHandler._handleFile (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:400:14)
    at NodeFsHandler._addToNodeFs (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:637:21)

Node.js v18.9.1
 ELIFECYCLE  Command failed with exit code 1.

Not sure what the problem is?

I wasn't able to run histore: ``` $ pnpm story:dev > vikunja-frontend@0.10.0 story:dev /home/konrad/www/vikunja/frontend > histoire dev Building "legacy" build with "@vitejs/plugin-legacy" Building "legacy" build with "@vitejs/plugin-legacy" file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70 throw new Error(`No support plugin found for file ${absoluteFilePath}`); ^ Error: No support plugin found for file /home/konrad/www/vikunja/frontend/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa at addStory (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70:15) at FSWatcher.<anonymous> (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:41:27) at FSWatcher.emit (node:events:513:28) at FSWatcher.emitWithAll (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:540:8) at FSWatcher._emit (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:632:8) at NodeFsHandler._handleFile (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:400:14) at NodeFsHandler._addToNodeFs (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:637:21) Node.js v18.9.1  ELIFECYCLE  Command failed with exit code 1. ``` Not sure what the problem is?
Owner

The .histoire folder should be ignored by gitignore as well.

The `.histoire` folder should be ignored by gitignore as well.
Author
Member

I wasn't able to run histore:

$ pnpm story:dev

> vikunja-frontend@0.10.0 story:dev /home/konrad/www/vikunja/frontend
> histoire dev

Building "legacy" build with "@vitejs/plugin-legacy"
Building "legacy" build with "@vitejs/plugin-legacy"
file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70
        throw new Error(`No support plugin found for file ${absoluteFilePath}`);
              ^

Error: No support plugin found for file /home/konrad/www/vikunja/frontend/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa
    at addStory (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70:15)
    at FSWatcher.<anonymous> (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:41:27)
    at FSWatcher.emit (node:events:513:28)
    at FSWatcher.emitWithAll (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:540:8)
    at FSWatcher._emit (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:632:8)
    at NodeFsHandler._handleFile (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:400:14)
    at NodeFsHandler._addToNodeFs (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:637:21)

Node.js v18.9.1
 ELIFECYCLE  Command failed with exit code 1.

Not sure what the problem is?

Maybe because of this: b11afe0aa4

> I wasn't able to run histore: > > > ``` > $ pnpm story:dev > > > vikunja-frontend@0.10.0 story:dev /home/konrad/www/vikunja/frontend > > histoire dev > > Building "legacy" build with "@vitejs/plugin-legacy" > Building "legacy" build with "@vitejs/plugin-legacy" > file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70 > throw new Error(`No support plugin found for file ${absoluteFilePath}`); > ^ > > Error: No support plugin found for file /home/konrad/www/vikunja/frontend/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa > at addStory (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70:15) > at FSWatcher.<anonymous> (file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:41:27) > at FSWatcher.emit (node:events:513:28) > at FSWatcher.emitWithAll (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:540:8) > at FSWatcher._emit (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/index.js:632:8) > at NodeFsHandler._handleFile (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:400:14) > at NodeFsHandler._addToNodeFs (/home/konrad/www/vikunja/frontend/node_modules/.pnpm/chokidar@3.5.3/node_modules/chokidar/lib/nodefs-handler.js:637:21) > > Node.js v18.9.1 >  ELIFECYCLE  Command failed with exit code 1. > ``` > > Not sure what the problem is? Maybe because of this: https://kolaente.dev/vikunja/frontend/commit/b11afe0aa4cc8a548d0fd2ad7539242d2e2eaf95
Author
Member

The .histoire folder should be ignored by gitignore as well.

Done

> The `.histoire` folder should be ignored by gitignore as well. Done
Owner

Maybe because of this: b11afe0aa4

Looks like it still does not work for me :/

> Maybe because of this: b11afe0aa4 Looks like it still does not work for me :/
dpschen force-pushed feature/add-histoire from 23c9edfa9c to 58dc20f4a8 2023-01-04 16:19:51 +00:00 Compare
Author
Member

I wasn't able to run histore:

[...]
file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70
        throw new Error(`No support plugin found for file ${absoluteFilePath}`);
              ^

Error: No support plugin found for file /home/konrad/www/vikunja/frontend/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa
    at addStory 
[...]

Not sure what the problem is?

I added .direnv to storyIgnored. Does that solve it for you?

> I wasn't able to run histore: > > > ``` > [...] > file:///home/konrad/www/vikunja/frontend/node_modules/.pnpm/histoire@0.12.4_k6mvyuljmrce5d7id6wo6g2kki/node_modules/histoire/dist/node/stories.js:70 > throw new Error(`No support plugin found for file ${absoluteFilePath}`); > ^ > > Error: No support plugin found for file /home/konrad/www/vikunja/frontend/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa > at addStory > [...] > ``` > > Not sure what the problem is? I added `.direnv` to [`storyIgnored`](https://histoire.dev/reference/config.html#storyignored). Does that solve it for you?
konrad approved these changes 2023-01-05 10:21:00 +00:00
konrad left a comment
Owner

Seems to work now. Thanks for fixing!

Seems to work now. Thanks for fixing!
Owner

Please rebase once more, ready to merge then.

Please rebase once more, ready to merge then.
dpschen added 4 commits 2023-01-05 22:30:46 +00:00
dpschen requested review from konrad 2023-01-05 22:35:36 +00:00
Author
Member

Oh no! I didn't even want to re-request approval.
That button doesn't look like a button, but more like a state (and directly next to it you access the CI logs).

Oh no! I didn't even want to re-request approval. That button doesn't look like a button, but more like a state (and directly next to it you access the CI logs).
konrad merged commit a4424e089c into main 2023-01-06 09:27:11 +00:00
konrad referenced this issue from a commit 2023-01-06 09:27:11 +00:00
konrad deleted branch feature/add-histoire 2023-01-06 09:27:11 +00:00
Author
Member




This repo is archived. You cannot comment on pull requests.
No description provided.