Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to right sidebar #2279

Merged
merged 17 commits into from
Aug 15, 2022

Conversation

tangjeff0
Copy link
Collaborator

@tangjeff0 tangjeff0 commented Aug 14, 2022

  • moves right-sidebar state open/close and items state from re-frame to the graph
  • can reorder items
  • uses @{{presence-name}} to store the sidebar state. uses @You if in PKM
  • moves onClickOpenInMainView to always be in the right sidebar item, rather than within the embedded page view of right sidebar item's
  • page's graph now is in the center of the page for some reason, but commented out because it's not a useful feature

https://www.loom.com/share/68de592360b946efa2dae202eb9e0741?focus_title=1&muted=1&from_recorder=1

@vercel
Copy link

vercel bot commented Aug 14, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
athens ✅ Ready (Inspect) Visit Preview Aug 15, 2022 at 1:58PM (UTC)

@@ -47,6 +47,15 @@
(:username current-user)))


(rf/reg-sub
:presence/user-page
:<- [:presence/current-username]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what should happen here is :presence/current-username returns You when in PKM. That way other features get this behaviour automatically.

But other features might already be checking if PKM or CKM as well so this refactor might be a bit harder. I think I'll tackle it in another PR.

(fn [e] (router/navigate-uid uid e)))
:onClickOpenInSidebar (when-not (contains? @(subscribe [:right-sidebar/items]) uid)
#(dispatch [:right-sidebar/open-item uid]))}
[:> PageHeader {:onClickOpenInSidebar (when-not @(subscribe [:right-sidebar/contains-item? [:block/uid uid]])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is onClickOpenInMainView not supported here anymore?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be removed, except on daily notes.

src/cljs/athens/views/pages/node_page.cljs Show resolved Hide resolved
src/cljs/athens/views/right_sidebar/events.cljs Outdated Show resolved Hide resolved
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