Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

refactor: currentPod dependency, fix pod card #425

Merged
merged 2 commits into from
Jul 20, 2022
Merged

Conversation

toadfanszz
Copy link
Contributor

@toadfanszz toadfanszz commented Jul 20, 2022

  1. Add My Pod to missing <PodCard/>
  2. Fix a problem that user cannot create document in team groups.
  3. Add currentPodUsername to fetch currentPodUsername from globalThis.
  4. Remove dependency of currentPod: (blockCreate, BlockPinOrUnpin, BlockCommit)

As we can't get correct username in path or params, we should remove currentPod and move username to graphql argments.

cc @0xDing @stackia

fix: bio can be null

refactor: currentPodLegacy

refactor: blockCreate add username

refactor: commit/pin remove current_pod

fix: fallback username

fix: podCard

fix: spec
Copy link
Contributor Author

toadfanszz commented Jul 20, 2022

The way we get the currentPod on the backend now (via request.params) is not working. In the long run we'll have to remove this dependency and pass the username parameter from the frontend.

I'm temporarily getting the correct username via location.pathname, need to review this approach

@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Merging #425 (fe33e39) into main (f082d65) will decrease coverage by 0.00%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main     #425      +/-   ##
==========================================
- Coverage   69.30%   69.30%   -0.01%     
==========================================
  Files        1056     1057       +1     
  Lines       17946    17949       +3     
  Branches     2475     2474       -1     
==========================================
+ Hits        12438    12439       +1     
  Misses       5204     5204              
- Partials      304      306       +2     
Flag Coverage Δ
backend-unit 87.58% <100.00%> (+0.02%) ⬆️
frontend-unit 64.80% <12.50%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...client-web/src/common/components/PodCard/index.tsx 0.00% <0.00%> (ø)
apps/client-web/src/core/initializers/sentry.ts 0.00% <0.00%> (ø)
...lient-web/src/core/typePolicies/mashcardContext.ts 0.00% <0.00%> (ø)
...c/docs_legacy/common/components/PageMenu/index.tsx 0.00% <0.00%> (ø)
.../docs_legacy/common/components/PodSelect/index.tsx 0.00% <ø> (ø)
...docs_legacy/common/components/TopbarMore/index.tsx 0.00% <0.00%> (ø)
...ocs_legacy/common/components/TrashPrompt/index.tsx 0.00% <0.00%> (ø)
...gacy/common/hooks/useCreateAndNavigateToNewPage.ts 0.00% <0.00%> (ø)
...-web/src/docs_legacy/pages/DocumentContentPage.tsx 0.00% <0.00%> (ø)
...src/docs_legacy/pages/components/NewPage/index.tsx 0.00% <0.00%> (ø)
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f082d65...fe33e39. Read the comment docs.

@toadfanszz toadfanszz temporarily deployed to pr_preview July 20, 2022 09:00 Inactive
@github-actions
Copy link
Contributor

This pull request has been built and is available for preview at pr425.mashcard.dev.
Default username/password is test1@example.com & test1234.

Devtools

@0xDing 0xDing requested a review from stackia July 20, 2022 09:02
@toadfanszz toadfanszz merged commit 9774034 into main Jul 20, 2022
@toadfanszz toadfanszz deleted the fix-pod-card branch July 20, 2022 09:29
@toadfanszz toadfanszz mentioned this pull request Jul 20, 2022
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sidebar pod menu lack My pod flag
2 participants