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

Preview #347

Merged
merged 3 commits into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions src/components/CreateEditDocument/CreateEditDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -1602,9 +1602,13 @@ const CreateEditDocument = ({
key={gid}
text={groupsShared.core[gid]?.name}
fontSize={14}
maxHeight={30}
textLineHeight="14px"
display="flex"
color="blue"
onDelete={() => deleteGroup(gid)}
marginRight={6}
marginBottom={4}
/>
),
)}
Expand All @@ -1627,9 +1631,13 @@ const CreateEditDocument = ({
key={gid}
text={groupsShared.contributions[gid]?.name}
fontSize={14}
maxHeight={30}
textLineHeight="14px"
display="flex"
color="blue"
onDelete={() => deleteGroup(gid)}
marginRight={6}
marginBottom={4}
/>
),
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@
}

.groupShareContainer {
display: flex;
flex-wrap: wrap;
border-radius: 4px;
border: 1px solid #CDCEDA;
background-color: #f9f9f9;
Expand Down
11 changes: 7 additions & 4 deletions src/components/DashboardChannels/AnnotationsChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,13 @@ export default function AnnotationsChannel({
}
}

annotations[slug].page = page;
annotations[slug].mine.push(...mine);
annotations[slug].shared.push(...shared);
annotations[slug]['shared-with-me'].push(...sharedWithMe);
if (annotations[slug].page !== page) {
annotations[slug].page = page;
annotations[slug].mine.push(...mine);
annotations[slug].shared.push(...shared);
annotations[slug]['shared-with-me'].push(...sharedWithMe);
}

} else {
annotations[slug] = {
countByPermissions,
Expand Down
2 changes: 1 addition & 1 deletion src/components/DashboardChannels/IdeaSpaceTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function IdeaSpaceTile({
<TileBadge
key="existingAnnotationsText"
color="red"
maxWidth={300}
maxTextWidth={300}
text={existingText}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/DashboardChannels/IdeaSpacesChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default function IdeaSpacesChannel({
<TileBadge
key="existingAnnotationsText"
color="red"
maxWidth={300}
maxTextWidth={300}
text={existingText}
/>
);
Expand Down
9 changes: 7 additions & 2 deletions src/components/TileBadge/TileBadge.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ export default function TileBadge({
marginLeft = 0,
marginBottom = 0,
marginRight = 0,
maxWidth = 200,
maxTextWidth = 200,
maxHeight,
textLineHeight,
display,
href,
fontSize = 10,
icon,
Expand Down Expand Up @@ -94,12 +97,14 @@ export default function TileBadge({
cursor: 'default',
alignItems: 'center',
justifyContent: 'center',
maxHeight,
display,
}}
>
{icon}
<span
className={styles.tileBadgeText}
style={{ maxWidth }}
style={{ maxWidth: maxTextWidth, lineHeight: textLineHeight }}
>
{text}
</span>
Expand Down
1 change: 1 addition & 0 deletions src/components/TileBadge/TileBadge.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
}

.draggableTileBadge {
Expand Down
5 changes: 4 additions & 1 deletion src/pages/documents/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ const DocumentsIndex = ({
key={`group-tile-badge-${id}`}
color="grey"
marginRight={5}
marginBottom={4}
maxHeight={25}
maxTextWidth={180}
text={groupNamesObj[id]}
/>
) : <></>
Expand Down Expand Up @@ -489,7 +492,7 @@ const DocumentsIndex = ({
},
},
{ content: contributorsListToContributorsContent(contributors) || '-', style: { color: '#86919D' } },
{ content: groupsToTileBadges(groups) || '-', style: { color: '#86919D' } },
{ content: groupsToTileBadges(groups) || '-', style: { display: 'flex', flexWrap: 'wrap', color: '#86919D' } },
{ content: state || '-', style: { color: '#86919D' } },
{
content: (createdAt && (
Expand Down
Loading