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-5345: Primitives #984

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6365105
JS-5425: Sidebar right panel
ra3orblade Oct 11, 2024
a5b9d0f
JS-5425: Sidebar right panel
ra3orblade Oct 11, 2024
4b60b4e
add type page
ra3orblade Oct 11, 2024
f8adb77
inner pages
ra3orblade Oct 11, 2024
5c2c5c5
inner pages
ra3orblade Oct 11, 2024
2a574a8
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/pr…
ra3orblade Oct 16, 2024
78530a1
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/pr…
ra3orblade Oct 25, 2024
dd59947
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/pr…
ra3orblade Oct 28, 2024
af812bc
updates
ra3orblade Oct 28, 2024
dd17d4a
JS-5692: layout section
ra3orblade Oct 28, 2024
085ca70
refactoring
ra3orblade Oct 28, 2024
4ac8a68
fields section
ra3orblade Oct 28, 2024
a8fcfe6
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/pr…
ra3orblade Oct 29, 2024
1e5b553
component architecture update, data saving
ra3orblade Oct 29, 2024
fd0113a
refactoring
ra3orblade Oct 29, 2024
4e0ba51
JS-5693: relations section
ra3orblade Oct 29, 2024
d971fdb
JS-5693: relations section
ra3orblade Oct 29, 2024
5f62a3d
drag and drop fixes
ra3orblade Oct 29, 2024
fc232f6
refactoring and updates
ra3orblade Oct 29, 2024
8d094c6
JS-5603: add sort to ListObject initial
ra3orblade Oct 29, 2024
dc3a304
JS-5712: edit relations
ra3orblade Oct 29, 2024
2e57e14
JS-5712: edit relations
ra3orblade Oct 29, 2024
2a5c867
JS-5517: remove widgetContainer #list
ra3orblade Oct 29, 2024
bcd1f10
add relations
ra3orblade Oct 29, 2024
d82704f
add relations
ra3orblade Oct 29, 2024
6229456
JS-5603: add sort to ListObject
ra3orblade Oct 29, 2024
30998ea
remove redundant code from PageMainType
ra3orblade Oct 29, 2024
5a69b77
JS-5588: PageMainType updates
ra3orblade Oct 29, 2024
7a9e142
JS-5588: fix
ra3orblade Oct 29, 2024
b3486c2
refactoring
ra3orblade Oct 29, 2024
760f36f
select fixes
ra3orblade Oct 29, 2024
140349b
merge
ra3orblade Oct 29, 2024
5456527
refactoring
ra3orblade Oct 30, 2024
ee7855f
refactoring
ra3orblade Oct 30, 2024
40bfd5f
refactoring
ra3orblade Oct 30, 2024
c714f02
JS-5587: relations in object
ra3orblade Oct 30, 2024
2ac3140
JS-5587: relations in object
ra3orblade Oct 30, 2024
0333045
JS-5587: relations in object
ra3orblade Oct 30, 2024
7fcb9c1
relation page update
ra3orblade Oct 30, 2024
bb60ad1
relation page update
ra3orblade Oct 30, 2024
1ce3e5d
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/pr…
ra3orblade Oct 30, 2024
51852fa
JS-5590: panel animation
ra3orblade Oct 30, 2024
c901842
animation fixes
ra3orblade Oct 30, 2024
c5e251c
sidebar updates
ra3orblade Oct 30, 2024
dd97368
sidebar updates
ra3orblade Oct 30, 2024
12ee7b7
small fixes
ra3orblade Oct 30, 2024
c885eba
fix sentry crash
ra3orblade Oct 30, 2024
0a1ee3d
fix sentry crash
ra3orblade Oct 31, 2024
df2e4c5
fix sentry crash
ra3orblade Oct 31, 2024
56d75cf
fix confirm
ra3orblade Nov 1, 2024
44a0f25
#1026: fix
ra3orblade Nov 1, 2024
27cc08b
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/pr…
ra3orblade Nov 1, 2024
65e3849
fix import
ra3orblade Nov 1, 2024
5fa4a86
fix drag styles
ra3orblade Nov 1, 2024
b17bf9d
merge
ra3orblade Nov 6, 2024
7d3073b
fix dragndrop
ra3orblade Nov 6, 2024
76b48ec
fixes and debug
ra3orblade Nov 6, 2024
84ae001
Merge branch 'main' of github.com:anyproto/anytype-ts into feature/pr…
ra3orblade Nov 12, 2024
6f2b7ed
JS-5725: description updates
ra3orblade Nov 12, 2024
ff85d47
JS-5725: description updates
ra3orblade Nov 12, 2024
12f7a47
merge
ra3orblade Nov 21, 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
5 changes: 5 additions & 0 deletions dist/img/icon/relation/description.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/img/icon/add/description0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/img/icon/add/description1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions src/img/icon/add/layout0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions src/img/icon/add/layout1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/img/icon/plus/template.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: 0 additions & 4 deletions src/img/icon/plus/template0.svg

This file was deleted.

4 changes: 0 additions & 4 deletions src/img/icon/plus/template1.svg

This file was deleted.

8 changes: 8 additions & 0 deletions src/img/icon/sidebar/dnd.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/sidebar/eye0.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/img/icon/sidebar/eye1.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/sortArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/json/relation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ export default {
],

type: [
'featuredRelations',
'recommendedRelations',
'recommendedLayout',
'sourceObject',
'uniqueKey',
'defaultTemplateId',
'layoutAlign',
],

graph: [
Expand Down
25 changes: 20 additions & 5 deletions src/json/text.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"commonCreateObjectWithName": "Create Object \"%s\"",
"commonCreateObjectTypeWithName": "Create Object Type \"%s\"",
"commonCreateObject": "Create Object",
"commonCreateNewTemplate": "Create new Template",
"commonUrl": "Url",
"commonEdit": "Edit",
"commonShare": "Share",
Expand All @@ -176,7 +177,8 @@
"pluralDay": "day|days",
"pluralObject": "Object|Objects",
"pluralLCObject": "object|objects",
"pluralTemplate": "template|templates",
"pluralTemplate": "Template|Templates",
"pluralLCTemplate": "template|templates",
"pluralRelation": "Relation|Relations",
"pluralBlock": "Block|Blocks",
"pluralObjectType": "Object Type|Object Types",
Expand Down Expand Up @@ -450,7 +452,6 @@

"pageMainNavigationItemEmptyTitle": "Object can not be shown",

"pageMainTypeRecommendedLayout": "Recommended layout",
"pageMainTypeNewSetOfObjects": "New Set of Objects",
"pageMainTypeNoTemplates": "This Object Type doesn't have Templates",

Expand Down Expand Up @@ -497,10 +498,14 @@
"pageHeadSimpleCreateSet": "Create Set",
"pageHeadSimpleInstall": "Install",

"editorControlIcon": "Icon",
"editorControlCover": "Cover",
"editorControlLayout": "Layout",
"editorControlIcon0": "Add icon",
"editorControlIcon1": "Icon",
"editorControlCover0": "Add cover",
"editorControlCover1": "Cover",
"editorControlLayout": "Settings",
"editorControlRelation": "Relations",
"editorControlDescription0": "Add description",
"editorControlDescription1": "Hide description",

"editorPagePasteLink": "Paste as link",
"editorPageCreateBookmarkObject": "Create Bookmark Object",
Expand Down Expand Up @@ -1825,6 +1830,16 @@
"sidebarObjectSortUpdated": "Date updated",
"sidebarObjectSortLastUsed": "Date last used",

"sidebarTypeTitle": "Editing type",
"sidebarSectionLayoutName": "Layout",
"sidebarSectionLayoutType": "Layout type",
"sidebarSectionLayoutAlign": "Header position",
"sidebarSectionLayoutWidth": "Layout width",
"sidebarTypeRelation": "Fields",
"sidebarTypeRelationHeader": "Header",
"sidebarTypeRelationSidebar": "Sidebar",
"sidebarObjectRelationSetUp": "Set up",

"unsplashString": "Photo by %s on %s",
"templateBannner": "You are editing a template",

Expand Down
1 change: 0 additions & 1 deletion src/scss/block/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
@import "./bookmark";
@import "./cover";
@import "./dataview";
@import "./dataview/cell";
@import "./dataview/view/board";
@import "./dataview/view/common";
@import "./dataview/view/gallery";
Expand Down
14 changes: 7 additions & 7 deletions src/scss/block/cover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,10 @@
.author a { color: var(--color-bg-primary); }

.elements {
.controlButtons { position: absolute; left: 0px; bottom: 18px; }
.controlButtons { position: absolute; left: 0px; bottom: 18px; display: flex; align-items: center; gap: 0px 8px; }
.controlButtons.small {
.btn { padding: 0px 6px; }
.btn {
.icon { margin: 0px; }
.txt { display: none; }
}
}
Expand All @@ -53,25 +52,26 @@
}

.btn {
font-weight: 500; font-size: var(--font-size-common); height: 28px; line-height: 28px; display: inline-block;
padding: 0px 8px; border-radius: 6px; margin-right: 8px; white-space: nowrap; transition: background $transitionCommon;
font-weight: 500; font-size: var(--font-size-common); height: 28px; line-height: 28px; display: flex; align-items: center; gap: 0px 4px;
padding: 0px 8px; border-radius: 6px; white-space: nowrap; transition: background $transitionCommon;
}
.btn:last-child { margin: 0px; }

.btn.white { background: rgba(255,255,255,0.7); }
.btn.white:hover, .btn.white.hover { background: rgba(255,255,255,0.9); }

.btn.black { color: var(--color-bg-primary); background: rgba(0,0,0,0.5); line-height: 22px; }
.btn.black:hover, .btn.black.active { background: rgba(0,0,0,0.7); }

.btn.withIcon { padding: 0px 8px 0px 6px; line-height: 26px; }
.btn.withIcon { padding: 0px 8px 0px 6px; }
.btn.small { padding: 0px 6px; }

.btn {
.icon { width: 20px; height: 20px; margin: 0px 4px 0px 0px; vertical-align: middle; }
.icon { width: 20px; height: 20px; }
.icon.icon { background-image: url('~img/icon/add/icon1.svg'); }
.icon.addCover { background-image: url('~img/icon/add/cover1.svg'); }
.icon.layout { background-image: url('~img/icon/add/layout1.svg'); }
.icon.relation { background-image: url('~img/icon/add/relation1.svg'); }
.icon.description { background-image: url('~img/icon/add/description1.svg'); }
}

.btn.drag { position: absolute; cursor: grab; width: 210px; top: 50%; left: 50%; margin: -12px 0px 0px -105px; }
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions src/scss/component/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
@import "./hightlight";
@import "./progressBar";
@import "./share";
@import "./cell";

@import "./preview/common";
@import "./media/common";
Expand Down
17 changes: 10 additions & 7 deletions src/scss/component/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,28 @@
}

.btn {
background: var(--color-bg-primary); font-weight: 500; font-size: var(--font-size-common); color: var(--color-control-active); display: inline-block;
transition: background $transitionCommon, color $transitionCommon; height: 28px; padding: 0px 8px 0px 6px; border-radius: 6px; display: flex;
flex-direction: row; align-items: center;
background: var(--color-bg-primary); font-weight: 500; font-size: var(--font-size-common); color: var(--color-control-active); display: flex;
transition: background $transitionCommon, color $transitionCommon; height: 28px; padding: 0px 8px 0px 6px; border-radius: 6px;
flex-direction: row; align-items: center; gap: 0px 4px;
}
.btn:hover, .btn.hover { background: var(--color-shape-highlight-medium); color: var(--color-text-primary); }

.btn.small { padding: 0px 6px; }

.btn {
.icon { width: 20px; height: 20px; margin-right: 4px; }
.icon { width: 20px; height: 20px; }
.icon.icon { background-image: url('~img/icon/add/icon0.svg'); }
.icon.addCover { background-image: url('~img/icon/add/cover0.svg'); }
.icon.layout { background-image: url('~img/icon/add/layout0.svg'); }
.icon.relation { background-image: url('~img/icon/add/relation0.svg'); }
.icon.relation { background-image: url('~img/icon/add/relation0.svg'); }
.icon.description { background-image: url('~img/icon/add/description0.svg'); }
}
.btn:hover, .btn.hover {
.icon.icon { background-image: url('~img/icon/add/icon1.svg'); }
.icon.addCover { background-image: url('~img/icon/add/cover1.svg'); }
.icon.layout { background-image: url('~img/icon/add/layout1.svg'); }
.icon.relation { background-image: url('~img/icon/add/relation1.svg'); }
.icon.relation { background-image: url('~img/icon/add/relation1.svg'); }
.icon.description { background-image: url('~img/icon/add/description1.svg'); }
}
}
.editorControls:hover, .editorControls.hover, .editorControls.active { opacity: 1; }
Expand Down Expand Up @@ -164,7 +168,6 @@
.controlButtons { left: 144px !important; }
}

&.withIconAndCover { padding-top: 214px; }
&.withIconAndCover {
.controlButtons { bottom: 26px; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/scss/component/headSimple.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
> .descr { @include text-paragraph; }
}

.side.right { flex-shrink: 0; text-align: right; }
.side.right { flex-shrink: 0; text-align: right; gap: 0px 16px; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; }
.side.right {
.button { white-space: nowrap; }
}
Expand Down
6 changes: 3 additions & 3 deletions src/scss/component/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,18 @@
.side.left { transition: padding-left $transitionSidebarTime linear; }
}

.header:not(.withSidebar) {
.header:not(.withSidebarLeft) {
.side.left { padding-left: 120px; }
}

html:not(.platformMac) {
.header:not(.withSidebar) {
.header:not(.withSidebarLeft) {
.side.left { padding-left: 52px; }
}
}

body.isFullScreen {
.header:not(.withSidebar) {
.header:not(.withSidebarLeft) {
.side.left { padding-left: 52px; }
}
}
Expand Down
8 changes: 3 additions & 5 deletions src/scss/component/preview/object.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@

.heading { display: block; margin-bottom: 14px; position: relative; z-index: 1; }
.heading {
.iconObject { display: inline-block; background-color: var(--color-shape-tertiary); border-radius: 8px; margin: 0px 0px 2px 0px; box-shadow: 0px 0px 0px 2px var(--color-bg-primary) inset; }
.iconObject {
.iconImage { border: 2px solid var(--color-bg-primary); }
}
.iconObject { display: inline-block; background-color: var(--color-shape-tertiary); border-radius: 8px; margin: 0px 0px 6px 0px; box-shadow: 0px 0px 0px 2px var(--color-bg-primary); }
.iconObject.isTask { background: none; position: absolute; top: 2px; left: -24px; box-shadow: 0px 0px !important; }

.name { display: block; @include text-paragraph; @include text-overflow-nw; font-weight: 700; position: relative; width: 100%; }
.description { @include text-small; @include text-overflow-nw; }

Expand Down Expand Up @@ -195,7 +193,7 @@
}

/* PreviewObject Medium */
.previewObject.medium { width: 224px; height: 158px; }
.previewObject.medium { width: 224px; height: 160px; }
.previewObject.medium {
.cover { height: 72px; }
.scroller { padding: 32px 24px; }
Expand Down
11 changes: 9 additions & 2 deletions src/scss/component/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@
#sidebarToggle.sidebarAnimation { transition: left $transitionSidebarTime linear; }
#sidebarToggle:hover, #sidebarToggle.hover { background-color: var(--color-shape-highlight-medium) !important; background-image: url('~img/icon/widget/toggle1.svg'); }

.sidebar { position: fixed; z-index: 21; user-select: none; transition: none; top: 0px; left: 0px; height: 100%; }
.sidebar.anim { transition-property: width; transition-duration: $transitionSidebarTime; transition-timing-function: linear; }
.sidebar { position: fixed; z-index: 21; user-select: none; transition: none; top: 0px; height: 100%; background-color: var(--color-shape-tertiary); }
.sidebar.anim { transition-duration: $transitionSidebarTime; transition-timing-function: linear; }
.sidebar.withVault { left: $vaultWidthCollapsed; }
.sidebar.isClosed { left: 0px !important; }

.sidebar.left { left: 0px; }
.sidebar.left.anim { transition-property: width; }

.sidebar.right { right: -348px; width: 348px; }
.sidebar.right.anim { transition-property: right; }

.sidebar {
@import "./sidebar/widget";
@import "./sidebar/object";
@import "./sidebar/page";

.resize-h { width: 10px; height: 100%; cursor: col-resize; z-index: 2; flex-shrink: 0; position: absolute; right: -5px; top: 0px; }
.resize-h {
Expand Down
2 changes: 1 addition & 1 deletion src/scss/component/sidebar/object.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> #containerObject { width: 100%; height: 100%; overflow: hidden; background-color: var(--color-shape-tertiary); padding: 52px 12px 12px 12px; }
> #containerObject { width: 100%; height: 100%; overflow: hidden; padding: 52px 12px 12px 12px; }
> #containerObject {
> .inner { display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--color-bg-primary); border-radius: 12px; }
> .inner {
Expand Down
Loading
Loading