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

Feature/JS-4130: History updates #707

Merged
merged 69 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
920fd6a
JS-4130: History updates
ra3orblade May 2, 2024
bc6e188
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 6, 2024
e8cc042
history styles refactoring
ra3orblade May 6, 2024
76a4460
history styles refactoring
ra3orblade May 6, 2024
ee15d42
history styles refactoring
ra3orblade May 6, 2024
7d588c0
history styles refactoring
ra3orblade May 6, 2024
6397884
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 10, 2024
469b3cd
JS-4483: Events mapping
ra3orblade May 10, 2024
683d96f
Merge pull request #716 from anyproto/refactoring/JS-4483-events-mapping
ra3orblade May 10, 2024
7cbecaf
response mapping update, logic updates
ra3orblade May 10, 2024
280447b
events rendering
ra3orblade May 10, 2024
90f502a
update logic
ra3orblade May 10, 2024
ae6775d
details updates
ra3orblade May 10, 2024
94ed761
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 13, 2024
afa444a
design updates
ra3orblade May 13, 2024
f453a38
design updates
ra3orblade May 13, 2024
2b0dd37
fixes
ra3orblade May 13, 2024
4a08c29
fixes
ra3orblade May 13, 2024
b8443ef
JS-4541: add current version button
ra3orblade May 13, 2024
db7befd
header updates
ra3orblade May 13, 2024
22d8ed0
header updates
ra3orblade May 13, 2024
114ec8d
header updates
ra3orblade May 13, 2024
00c6069
refactor relation button
ra3orblade May 13, 2024
eb2db71
JS-4546: add panel header
ra3orblade May 13, 2024
c64adfd
fix changes layers
ra3orblade May 13, 2024
fbebd83
JS-4545: relations diff
ra3orblade May 13, 2024
e9c29b2
JS-4548: author icons
ra3orblade May 13, 2024
b29b57a
JS-4548: author icons
ra3orblade May 13, 2024
5073c98
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 13, 2024
744102e
JS-4542: add buttons
ra3orblade May 13, 2024
7c96264
localise fileLimitReached toast
ra3orblade May 13, 2024
465046e
JS-4568: show deleted blocks
ra3orblade May 15, 2024
bcd772b
add string diff calculation
ra3orblade May 15, 2024
5375edd
fix details unset
ra3orblade May 15, 2024
396e712
fix styles
ra3orblade May 16, 2024
9565875
merge
ra3orblade May 16, 2024
56161c9
JS-4578: add scroll to element
ra3orblade May 16, 2024
cbc466e
fixes
ra3orblade May 16, 2024
d7d7419
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 16, 2024
a85782e
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 16, 2024
acbbdb3
JS-4569: text diff
ra3orblade May 16, 2024
3f485f8
JS-4569: text diff
ra3orblade May 16, 2024
6e1ea31
JS-4569: text diff
ra3orblade May 16, 2024
d6fa301
fixes
ra3orblade May 16, 2024
31c6013
fixes
ra3orblade May 16, 2024
4759e73
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 17, 2024
a48521a
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 17, 2024
221d435
fix colors
ra3orblade May 17, 2024
1615bdd
JS-4592: fix
ra3orblade May 17, 2024
d892fa5
fix readonly elements in MenuDataviewRelationEdit
ra3orblade May 20, 2024
b47f9ad
merge
ra3orblade May 23, 2024
5461f6c
merge
ra3orblade May 25, 2024
e8d505a
update electron
ra3orblade May 25, 2024
4159da4
refactoring
ra3orblade May 27, 2024
40c31e2
history rework
ra3orblade May 27, 2024
ab2f6c8
JS-4657: fix
ra3orblade May 27, 2024
a9423d0
scroll refactoring
ra3orblade May 27, 2024
a08a5a6
scroll refactoring
ra3orblade May 27, 2024
8a27500
scroll refactoring
ra3orblade May 27, 2024
45fa25f
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 27, 2024
4b672ce
fixes
ra3orblade May 27, 2024
961bfc1
update loader
ra3orblade May 27, 2024
1879f5b
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 28, 2024
a4e972d
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 29, 2024
fde00cd
JS-4530: Add blockParticipants
ra3orblade May 29, 2024
5365ae1
merge
ra3orblade May 29, 2024
828e75e
show participants only on changed blocks
ra3orblade May 29, 2024
4ab7eea
update text diff logic
ra3orblade May 29, 2024
530adab
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/JS…
ra3orblade May 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@typescript-eslint/parser": "^6.18.1",
"cross-env": "^7.0.2",
"css-loader": "^3.6.0",
"electron": "^30.0.7",
"electron": "^30.0.8",
"electron-builder": "^24.13.3",
"eslint": "^8.29.0",
"eslint-plugin-react": "^7.31.11",
Expand Down Expand Up @@ -99,6 +99,7 @@
"blueimp-load-image": "^2.31.0",
"d3": "^7.0.1",
"d3-force": "^3.0.0",
"diff": "^5.2.0",
"dompurify": "^3.0.6",
"electron-dl": "^1.14.0",
"electron-json-storage": "^4.5.0",
Expand Down
3 changes: 0 additions & 3 deletions src/img/arrow/history0.svg

This file was deleted.

3 changes: 0 additions & 3 deletions src/img/arrow/history1.svg

This file was deleted.

4 changes: 2 additions & 2 deletions src/img/arrow/historyList.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/img/icon/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
8 changes: 6 additions & 2 deletions src/json/text.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
"commonUpdate": "Update",
"commonOwner": "Owner",
"commonUpdateProgress": "Downloading update... %s/%s",
"commonVersionHistory": "Version history",
"commonActions": "Actions",
"commonAddRelation": "Add Relation",
"commonCollection": "Collection",
Expand Down Expand Up @@ -296,8 +297,6 @@

"spellcheckAdd": "Add to dictionary",

"headerHistoryCurrent": "Current version",
"headerHistoryRestore": "Restore version",
"headerTooltipPath": "Click to search",

"headerGraphTooltipSearch": "Search",
Expand Down Expand Up @@ -429,6 +428,9 @@
"pageMainMembershipTitle": "Retrieving membership",
"pageMainMembershipError": "Something went wrong",

"pageMainHistoryCurrent": "Current version",
"pageMainHistoryRestore": "Restore",

"pageAuthLoginInvalidPhrase": "Invalid Key",

"pageAuthDeletedAccountDeletionTitle": "This vault is planned for deletion in %s",
Expand Down Expand Up @@ -1578,6 +1580,8 @@
"toastRelationRemoved": "Relation <b>%s</b> has been removed from your Library",
"toastSetDefaultTemplate": "This Template was Set as default",

"toastFileLimitReached": "Your local storage exceeds syncing limit. Locally stored files won't be synced",

"textColor-grey": "Grey",
"textColor-yellow": "Yellow",
"textColor-orange": "Amber",
Expand Down
4 changes: 4 additions & 0 deletions src/scss/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
--color-shape-highlight-light: rgba(79, 79, 79, 0.04);
--color-shape-highlight-light-solid: #f8f8f8;

--color-shape-highlight-add: rgba(93,212,0,0.2);
--color-shape-highlight-change: rgba(42,167,238,0.2);
--color-shape-highlight-remove: rgba(245,85,34,0.2);

/* Control */

--color-control-accent: #252525;
Expand Down
10 changes: 10 additions & 0 deletions src/scss/block/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
.wrapMenu, .wrapContent { display: none; }
}

.block.diffNone {
.wrapMenu {
.iconObject { display: block; }
}
}

.block {
.wrapMenu { width: 48px; text-align: right; position: relative; flex-shrink: 0; z-index: 1; flex-basis: 48px; }
.wrapContent { width: calc(100% - 48px); position: relative; flex-grow: 1; }
Expand All @@ -19,6 +25,10 @@
}
.wrapContent > .dropTarget.targetBot { height: 2px; bottom: 0px; }

.wrapMenu {
.iconObject { position: absolute; top: 4px; right: 4px; display: none; }
}

.flex { position: relative; z-index: 2; }
.icon.dnd {
width: 12px; height: 100%; background-size: 8px 16px; opacity: 0; cursor: grab; position: absolute; right: 6px; top: 0px;
Expand Down
2 changes: 2 additions & 0 deletions src/scss/block/text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
markupitalic { font-style: italic; }
markupstrike { text-decoration: line-through; }
markupunderline { border-bottom: 0.05em solid; }

markupchange { background-color: var(--color-shape-highlight-change); }

.markers { display: flex; padding: 1px 0px; }
.markers {
Expand Down
9 changes: 9 additions & 0 deletions src/scss/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ markuphighlight.active { background: orange !important; }
.dropTarget.targetTop.isOver.top { box-shadow: 0px -2px 0px var(--color-system-accent-100) inset; }
.dropTarget.targetBot.isOver.bottom { box-shadow: 0px 2px 0px var(--color-system-accent-100) inset; }

/* Diff elements for history */
.diffAdd, .diffChange, .diffRemove { position: relative; }
.diffAdd::after, .diffChange::after, .diffRemove::after { content: ""; border-radius: inherit; opacity: 0.5; }
.diffAdd::after, .diffChange::after { position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; z-index: 10; }
.diffRemove::after { position: relative; height: 30px; display: block; width: 100%; }
.diffAdd::after { background-color: var(--color-shape-highlight-add); }
.diffChange::after { background-color: var(--color-shape-highlight-change); }
.diffRemove::after { background-color: var(--color-shape-highlight-remove); }

.isSelectionSelected { position: relative; }

.selectionTarget.isSelectionSelected::after,
Expand Down
56 changes: 56 additions & 0 deletions src/scss/component/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,62 @@
}

/* Note */

.editorWrapper.isNote {
.editorControls { height: 70px; margin-bottom: 8px; }
}

/* Set, Collection */

.editorWrapper.isSet,
.editorWrapper.isCollection {
.blocks { width: calc(100% - 96px); margin: 0px auto; padding: 0px; user-select: none; }
.blocks {
.block {
.wrapMenu { display: none; }
.wrapContent { width: 100%; }
}
.block.blockDataview { padding: 0px; }

.editorControls { height: 52px; width: 100%; margin-bottom: 8px; padding: 0px 14px; }

.headSimple {
.side.right { display: none; }
}
}

.block.blockCover {
.elements { width: calc(100% - 96px); left: 48px; margin: 0px; }
}
}

.editorWrapper.isSet.withIcon,
.editorWrapper.isCollection.withIcon {
.controlButtons { left: 14px; }
}


.editorWrapper.isSet.withIconAndCover,
.editorWrapper.isCollection.withIconAndCover { padding-top: 356px; }
.editorWrapper.isSet.withIconAndCover,
.editorWrapper.isCollection.withIconAndCover {
.controlButtons { left: 0px !important; }
}

.editorWrapper.isSet.withIcon,
.editorWrapper.isSet.withIconAndCover,
.editorWrapper.isCollection.withIcon,
.editorWrapper.isCollection.withIconAndCover {
.headSimple {
.side.left { width: 96px; }
.side.center { width: calc(100% - 128px); }
}
#button-icon { display: none; }
}

.editorWrapper.isSet.withCover,
.editorWrapper.isSet.withIconAndCover,
.editorWrapper.isCollection.withCover,
.editorWrapper.isCollection.withIconAndCover {
.editorControls { display: none; }
}
28 changes: 5 additions & 23 deletions src/scss/component/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
.icon { -webkit-app-region: no-drag; flex-shrink: 0; }

.icon { width: 28px; height: 28px; background-size: 20px; border-radius: 6px; }
.icon:hover, .icon.hover { background-color: var(--color-shape-tertiary); }
.icon:hover, .icon.hover { background-color: var(--color-shape-highlight-medium); }

.icon.toggle { background-image: url('~img/icon/sidebar/toggle0.svg'); }
.icon.toggle:hover { background-image: url('~img/icon/sidebar/toggle1.svg'); }
.icon.toggle { background-image: url('~img/icon/widget/toggle0.svg'); }
.icon.toggle:hover { background-image: url('~img/icon/widget/toggle1.svg'); }
.icon.more { background-image: url('~img/icon/header/more.svg'); }
.icon.settings { background-image: url('~img/icon/header/settings.svg'); }
.icon.expand { display: none; background-image: url('~img/icon/header/expand.svg'); }
Expand All @@ -74,32 +74,14 @@ html:not(.bodyIndexIndex):not(.bodyAuthSelect) {
}
}

.header.mainHistory { height: 38px; width: calc(100% - 254px); background: var(--color-bg-primary); }
.header.mainHistory { height: 38px; width: calc(100% - 336px); background: var(--color-bg-primary); }
.header.mainHistory {
.side.left, .side.right { width: unset; -webkit-app-region: no-drag; }

.side.center { overflow: hidden; }
.side.center {
.txt { @include text-overflow-nw; }
}

.item {
color: var(--color-text-secondary); transition: $transitionAllCommon; height: 20px; line-height: 20px;
display: inline-block; vertical-align: middle; white-space: nowrap; -webkit-app-region: no-drag;
}
.item {
.icon.arrow { width: 20px; height: 20px; background-image: url('~img/arrow/history0.svg'); margin: 0px; vertical-align: top; }
}
.item.orange { color: var(--color-system-accent-100) !important; font-weight: 500; }

.item.grey:hover { color: var(--color-text-primary); }
.item.orange:hover { color: #f09c0e !important; }

.item:hover {
.icon.arrow { background-image: url('~img/arrow/history1.svg'); }
}
}
.header.mainHistory.snapLeft { right: 254px; }
.header.mainHistory.snapLeft { right: 336px; }

.header.isCommon { background: var(--color-bg-primary); height: 38px; }
.header.isCommon {
Expand Down
4 changes: 2 additions & 2 deletions src/scss/component/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
> .head {
.icon { width: 28px; height: 28px; background-size: 20px; border-radius: 6px; cursor: default; display: none; }
.icon:hover { background-color: var(--color-shape-highlight-medium); }
.icon.toggle { background-image: url('~img/icon/sidebar/toggle0.svg'); }
.icon.toggle:hover { background-image: url('~img/icon/sidebar/toggle1.svg'); }
.icon.toggle { background-image: url('~img/icon/widget/toggle0.svg'); }
.icon.toggle:hover { background-image: url('~img/icon/widget/toggle1.svg'); }
}

> .body { height: calc(100% - 12px); padding: 0px 12px 12px 12px; position: relative; flex-grow: 1; overflow: hidden; overscroll-behavior: none; }
Expand Down
3 changes: 2 additions & 1 deletion src/scss/list/widget.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@
> .dropTarget.lastTarget.isOver::before { top: -7px; }
}

.listWidget.isEditing { padding-bottom: 58px; }
.listWidget.isEditing {
> .buttons { position: fixed; bottom: 0px; left: 0px; padding: 16px; }
> .buttons { position: fixed; bottom: 0px; left: 0px; padding: 0px 16px 16px 16px; }

.widget:not(.isEditable) { opacity: 0.5; }
.widget:not(.isEditable) {
Expand Down
3 changes: 2 additions & 1 deletion src/scss/media/print.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ html.printMedia {
#editorSize { display: none !important; }
}

.pageMainEdit #bodyWrapper { padding: 0px !important; }
#bodyWrapper { padding: 0px !important; }

.pageMainType, .pageMainRelation {
.wrapper { padding: 2cm 0px; }
.wrapper {
Expand Down
3 changes: 1 addition & 2 deletions src/scss/page/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
@import "./main/navigation.scss";
@import "./main/relation.scss";
@import "./main/set.scss";
@import "./main/space.scss";
@import "./main/store.scss";
@import "./main/type.scss";
@import "./main/archive.scss";
Expand All @@ -16,4 +15,4 @@
@import "./main/empty.scss";
@import "./main/import.scss";
@import "./main/invite.scss";
@import "./main/membership.scss";
@import "./main/membership.scss";
Loading
Loading