mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 23:19:38 +00:00
* feat(graph): rebuild global graph view with Pixi Summary: - Replace /graph route with a new Pixi-based global graph implementation in ClojureScript. - Build graph data from db-worker only (no UI DB writeback) and default to tags+objects with a toggle for all pages. - Add fast scene rendering for large graphs with indexed hit-testing, zoom/pan, node dragging, and click/shift+click node actions. - Introduce dynamic label management (zoom hysteresis, viewport culling, overlap control, hover-emphasis) and fix hook lifecycle cleanup issues. - Refresh graph UI styling to full-container layout, dot-first settings control, and Logseq button usage. - Add/expand tests for global graph modes, node actions, and Pixi label/visibility logic. - Update graph-related dependencies/lockfile as part of the new implementation. * enhance(graph): improve drag exploration and label visibility - Dragging a node now pulls connected nodes with depth-based weights for easier structure exploration. - Labels are rendered only for currently visible node dots; hover no longer reveals hidden-node titles. - Hovered node title remains promoted in foreground while respecting visibility constraints. - Add logic/test coverage for connected drag weights and updated label text behavior. * enhance(graph): use d3 force layout Summary: - Move Graph V2 node layout into graph pixi logic. - Use d3-force link, charge, center, collision, and y forces instead of the hand-written ring/spiral layout. - Add coverage that linked graph nodes settle closer than an unlinked island. Dependency: - Verified d3-force is already latest at 3.0.0. Tests: - bb dev:test -v frontend.extensions.graph-pixi-logic-test - bb dev:test -v frontend.common.graph-view-v2-test - pnpm install --frozen-lockfile --lockfile-only * fix: graph view interactions * enhance: speed up large graph view * enhance: speed up tags graph * enhance: speed up tags layout * enhance: bound tags force layout * enhance: speed up graph opening * fix: keep graph objects visible when zoomed out * fix: resize graph with sidebars * enhance: select graph nodes * fix: refine graph selection controls * support icons * fix: sharpen graph node icons * enhance(graph): update graph v2 settings * fix: re-render graph when theme changes * enhance(graph): remove legacy graph view * fix: typo * fix: improve graph view * test: cover graph view improvements * enhance: improve graph view * test: cover graph time travel behavior * enhance: refine graph time travel * test: cover graph layout controls * enhance: add graph layout controls * test: cover graph highlight controls * fix: refine graph highlight controls * test: cover edge label alignment * fix: align graph edge labels * test: keep graph lines visible on highlight * fix: keep graph lines visible on highlight * fix: show graph lines by default * test: filter graph lines on highlight * fix: filter graph lines on highlight * test: keep graph depth incremental * fix: update graph depth incrementally * test: cover graph label link occlusion * fix: occlude graph links behind labels * test: cover graph edge visibility defaults * fix: smooth graph edges on highlight * test: cover graph arrow toggle * fix: toggle graph arrows * test: cover reciprocal graph edge offsets * fix: separate reciprocal graph edges * test: cover duplicate graph edge runs * fix: dedupe graph edge render runs * test: cover graph tag clusters * enhance: cluster graph tags layout * test: cover graph tag cluster colors * fix: color graph tag clusters by title * test: cover subdued graph node colors * fix: mute graph node colors * feat: grid layout * add more options * enhance(graph): drill into tags on zoom * map-like navigation * mod+click to preview node * edge enhancements * more tweaks * fix: block preview * enhance(graph): speed up large graph layout * fix: improve graph mode switching ux * fix: speed up graph view switching * fix: optimize large all-pages graph render * fix: speed up graph data build * fix: collapse graph tag settings on mode switch * enhance: refine graph panel width * fix: improve graph zoom performance * fix: satisfy graph lint * fix: open graph nodes by uuid --------- Co-authored-by: rcmerci <rcmerci@gmail.com>
236 lines
3.8 KiB
CSS
236 lines
3.8 KiB
CSS
.cp__page {
|
|
&-publish-actions {
|
|
background-color: var(--ls-primary-background-color);
|
|
padding: 50px 0;
|
|
margin: -1.5rem;
|
|
|
|
> h1 {
|
|
font-size: 18px;
|
|
padding: 15px;
|
|
text-align: center;
|
|
}
|
|
|
|
> .it {
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
padding-top: 5px;
|
|
padding-bottom: 5px;
|
|
|
|
button {
|
|
width: 90%;
|
|
justify-content: center;
|
|
padding: 15px 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.cp__vertical-menu-button {
|
|
opacity: 60%;
|
|
display: block;
|
|
}
|
|
|
|
.cp__vertical-menu-button:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
.cp__vertical-menu-button svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
|
|
.ls-page-title {
|
|
@apply rounded-sm;
|
|
|
|
&.title {
|
|
.block-main-container {
|
|
@apply gap-2;
|
|
}
|
|
}
|
|
|
|
.edit-input {
|
|
@apply w-full border-0 p-0 pr-1 bg-transparent outline-0;
|
|
|
|
box-shadow: none;
|
|
|
|
&-wrapper {
|
|
@apply rounded;
|
|
|
|
&.editing {
|
|
background-color: var(--ls-secondary-background-color);
|
|
}
|
|
}
|
|
}
|
|
|
|
.page-icon {
|
|
@apply font-[48px] leading-none;
|
|
|
|
.ui__button {
|
|
@apply !h-auto pb-[1.5px];
|
|
}
|
|
}
|
|
|
|
.ls-page-title-actions {
|
|
&:has(button[data-popup-active]) {
|
|
@apply opacity-100;
|
|
}
|
|
}
|
|
}
|
|
|
|
a.page-title {
|
|
padding: 0 8px;
|
|
margin-left: -8px;
|
|
transition: none;
|
|
display: block;
|
|
color: inherit;
|
|
}
|
|
|
|
.page-title-sizer-wrapper {
|
|
@apply w-full overflow-x-auto overflow-y-hidden;
|
|
|
|
:empty::before {
|
|
content: '\200b';
|
|
}
|
|
|
|
> .title {
|
|
@apply w-full overflow-hidden overflow-ellipsis;
|
|
}
|
|
}
|
|
|
|
html.is-native-android,
|
|
html.is-native-ipad,
|
|
html.is-native-iphone,
|
|
html.is-native-iphone-without-notch {
|
|
.ls-page-title {
|
|
margin: 0 0 10px -15px;
|
|
padding: 0 !important;
|
|
}
|
|
}
|
|
|
|
/* Change to another cursor style if Shift key is active */
|
|
[data-active-keystroke*="Shift" i] :is(.journal-title, .page-title,
|
|
.block-ref, .page-ref, a.tag,
|
|
.bullet-container.cursor) {
|
|
cursor: e-resize;
|
|
}
|
|
|
|
.ls-all-pages {
|
|
max-width: 1400px;
|
|
}
|
|
|
|
.add-button-link {
|
|
opacity: 0;
|
|
color: var(--ls-primary-text-color);
|
|
transform: scale(.8);
|
|
margin-left: -1px;
|
|
|
|
|
|
&:hover {
|
|
color: var(--ls-primary-text-color);
|
|
opacity: .6 !important;
|
|
transform: scale(.9);
|
|
}
|
|
|
|
&:active {
|
|
opacity: .8 !important;
|
|
}
|
|
|
|
&-wrap {
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
html.is-native-android,
|
|
html.is-native-ios {
|
|
.block-content-wrapper {
|
|
/* 38px is the width of block-control */
|
|
width: calc(100% - 35px);
|
|
@screen sm {
|
|
width: calc(100% - 33px);
|
|
}
|
|
}
|
|
}
|
|
|
|
.page-blocks-collapse-control, .page-blocks-collapse-control:hover {
|
|
text-decoration: none;
|
|
cursor: default;
|
|
min-width: 22px;
|
|
padding-top: 22px;
|
|
color: initial;
|
|
user-select: none;
|
|
|
|
.control-hide {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.toned-down {
|
|
opacity: 0.5;
|
|
color: var(--ls-secondary-text-color);
|
|
}
|
|
|
|
.highlighted {
|
|
opacity: 1;
|
|
color: var(--ls-primary-text-color);
|
|
}
|
|
|
|
.separator-top {
|
|
border-top: 1px solid var(--ls-quaternary-background-color);
|
|
}
|
|
|
|
.icon-box {
|
|
display: inline-block;
|
|
line-height: normal;
|
|
background-color: var(--ls-quaternary-background-color);
|
|
}
|
|
|
|
.references {
|
|
@apply select-none;
|
|
}
|
|
|
|
.no-ring {
|
|
@apply focus:ring-0 focus:ring-offset-0;
|
|
}
|
|
|
|
.ls-preview-popup {
|
|
@apply pl-6;
|
|
|
|
.tippy-wrapper {
|
|
@apply p-2;
|
|
|
|
&.as-page {
|
|
@apply -ml-5 pl-7 outline-none;
|
|
}
|
|
|
|
&.as-block {
|
|
@apply -ml-5;
|
|
}
|
|
}
|
|
}
|
|
|
|
.cp__right-sidebar {
|
|
.page-linked > .content {
|
|
@apply pt-2;
|
|
}
|
|
}
|
|
|
|
.ls-page-blocks {
|
|
@apply min-h-[60px] overflow-hidden;
|
|
}
|
|
|
|
/* Recycle page only: reduce the gap between "Recycle" title and its description label.
|
|
Scoped class so other pages are unaffected. */
|
|
.ls-recycle-page-title-compact {
|
|
margin-top: var(--ls-recycle-page-title-description-gap-offset, -1.25rem);
|
|
}
|
|
|
|
.ls-recycle-page-description {
|
|
margin-bottom: var(--ls-recycle-page-description-margin-bottom, 1rem);
|
|
}
|
|
|
|
.block-add-button {
|
|
&.selected {
|
|
opacity: 1 !important;
|
|
}
|
|
}
|