Skip to content

Commit

Permalink
UBERF-5595: merge main
Browse files Browse the repository at this point in the history
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
  • Loading branch information
kristina-fefelova committed Feb 22, 2024
2 parents 629cb8d + a246b69 commit abf70b1
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 5 deletions.
13 changes: 13 additions & 0 deletions models/chunter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,19 @@ export function createModel (builder: Builder, options = { addApplication: true
chunter.ids.BacklinkCreatedActivityViewlet
)

builder.createDoc(
activity.class.DocUpdateMessageViewlet,
core.space.Model,
{
objectClass: chunter.class.Backlink,
action: 'update',
component: chunter.component.BacklinkContent,
labelComponent: chunter.activity.BacklinkCreatedLabel,
hideIfRemoved: true
},
chunter.ids.BacklinkUpdateActivityViewlet
)

builder.createDoc(
activity.class.DocUpdateMessageViewlet,
core.space.Model,
Expand Down
1 change: 1 addition & 0 deletions models/chunter/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default mergeIds(chunterId, chunter, {
TxChatMessageRemove: '' as Ref<TxViewlet>,
ChunterNotificationGroup: '' as Ref<NotificationGroup>,
BacklinkCreatedActivityViewlet: '' as Ref<DocUpdateMessageViewlet>,
BacklinkUpdateActivityViewlet: '' as Ref<DocUpdateMessageViewlet>,
BacklinkRemovedActivityViewlet: '' as Ref<DocUpdateMessageViewlet>
},
activity: {
Expand Down
17 changes: 16 additions & 1 deletion packages/text-editor/src/kits/editor-kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,22 @@ export const EditorKit = Extension.create<EditorKitOptions>({
}),
CodemarkExtension,
Underline,
ListKeymap,
ListKeymap.configure({
listTypes: [
{
itemName: 'listItem',
wrapperNames: ['bulletList', 'orderedList']
},
{
itemName: 'taskItem',
wrapperNames: ['taskList']
},
{
itemName: 'todoItem',
wrapperNames: ['todoList']
}
]
}),
NodeUuidExtension,
...tableExtensions
// ...taskListExtensions // Disable since tasks are not working properly now.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
export let hoverStyles: 'borderedHover' | 'filledHover' = 'borderedHover'
export let withShowMore: boolean = true
export let attachmentImageSize: 'x-large' | undefined = undefined
export let showLinksPreview = true
export let onClick: (() => void) | undefined = undefined
export let onReply: (() => void) | undefined = undefined
Expand Down Expand Up @@ -66,6 +67,7 @@
hoverStyles,
withShowMore,
attachmentImageSize,
showLinksPreview,
onClick,
onReply
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,8 @@
return
}
updateSelectedDate()
if (selectedMessageId !== undefined && messages.some(({ _id }) => _id === selectedMessageId)) {
isScrollInitialized = true
await wait()
Expand Down Expand Up @@ -465,7 +467,7 @@
{#if startFromBottom}
<div class="grower" />
{/if}
{#if withDates && selectedDate}
{#if withDates && displayMessages.length > 0}
<div class="ml-2 pr-2">
<JumpToDateSelector {selectedDate} fixed on:jumpToDate={jumpToDate} />
</div>
Expand Down Expand Up @@ -511,6 +513,7 @@
shouldScroll={isSelected}
withShowMore={false}
attachmentImageSize="x-large"
showLinksPreview={false}
/>
</div>
{/each}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
position: relative;
flex-shrink: 0;
margin: 0.25rem 0;
height: 1.875rem;
&:not(:first-child)::after {
position: absolute;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
export let hoverStyles: 'borderedHover' | 'filledHover' = 'borderedHover'
export let withShowMore: boolean = true
export let attachmentImageSize: AttachmentImageSize = 'auto'
export let showLinksPreview = true
export let onClick: (() => void) | undefined = undefined
export let onReply: (() => void) | undefined = undefined
Expand Down Expand Up @@ -96,7 +97,7 @@
parentObject = result
})
$: links = getLinks(value?.message)
$: links = showLinksPreview ? getLinks(value?.message) : []
function getLinks (content?: string): HTMLLinkElement[] {
if (!content) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
{hoverStyles}
{withShowMore}
{attachmentImageSize}
showLinksPreview={false}
{onClick}
{onReply}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,11 @@
export let message: ActivityMessage
</script>

<ActivityMessagePresenter value={message} hideFooter hoverStyles="filledHover" withShowMore={false} skipLabel />
<ActivityMessagePresenter
value={message}
hideFooter
hoverStyles="filledHover"
withShowMore={false}
skipLabel
showLinksPreview={false}
/>
7 changes: 6 additions & 1 deletion plugins/task-resources/src/components/StatusSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@
$: updateStatuses($taskTypeStore, $statusStore.byId, kind)
let statuses: Status[] = []
let searchQuery: string = ''
$: filteredStatuses = !searchQuery
? statuses
: statuses.filter((status) => (status.name ?? '').toLowerCase().includes(searchQuery.toLowerCase()))
</script>

<DocPopup
{_class}
objects={statuses}
objects={filteredStatuses}
allowDeselect={true}
selected={current}
on:close={(evt) => {
Expand All @@ -76,6 +80,7 @@
{embedded}
loading={progress}
on:changeContent
on:search={(e) => (searchQuery = e.detail)}
>
<svelte:fragment slot="item" let:item>
<div class="flex-row-center flex-grow overflow-label">
Expand Down

0 comments on commit abf70b1

Please sign in to comment.