Skip to content

Conversation

@akabiru
Copy link
Member

@akabiru akabiru commented Nov 5, 2025

Ticket

https://community.openproject.org/wp/68723

What are you trying to accomplish?

Implement redesigned layout for real-time collaborative documents

Screenshots

Screenshot 2025-11-12 at 7 48 11 PM
Mobile openproject local_documents_2(Samsung Galaxy S8+)

What approach did you choose and why?

There are several workarounds to get the desired layout- D-Team approved.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@akabiru akabiru force-pushed the implementation/68723-redesign-document-show-page-for-collaborative-document-with-blocknote branch 5 times, most recently from 969ce0f to c2ebc99 Compare November 12, 2025 09:03
@akabiru akabiru force-pushed the implementation/68723-redesign-document-show-page-for-collaborative-document-with-blocknote branch from c2ebc99 to 527ded6 Compare November 12, 2025 16:46
@akabiru akabiru self-assigned this Nov 12, 2025
@akabiru akabiru marked this pull request as ready for review November 12, 2025 17:25
@akabiru akabiru requested review from a team and HDinger November 12, 2025 17:25
@akabiru akabiru force-pushed the implementation/68723-redesign-document-show-page-for-collaborative-document-with-blocknote branch from bca61f8 to 0cbcf56 Compare November 12, 2025 17:49
Copy link
Contributor

@brunopagno brunopagno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested out locally. The UI is looking neat, and the flow is quite nice. I don't think I see any blockers in merging this one.

But I wonder if there's any risk to allow accessing the /edit page when the document is marked as collaborative (if the user manually types the URL to that page). Because if the document is saved on the CKEditor form then the data could become out of sync.

Problems for us to solve as we continue implementing things

@mixin extended-content--top
#content-body
padding-top: 0
@media screen and (min-width: $breakpoint-sm)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid of global changes. How can I know that this is not going to have collateral effects somewhere else?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing and not just ignoring this @brunopagno 🙇
The change is actually from me 😅 The mixin is only used in one other place, so the impact is rather small. Due to the new way of handling PageHeaders on mobile, this is actually important and a bug we fixed 👍


def show
@attachments = @document.attachments.order(Arel.sql("created_at DESC"))
generate_oauth_token if @document.collaborative?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

Comment on lines +40 to +41
document_id: model.id,
document_name: model.title,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing this again, I believe we will need to cleanup a bunch the parameters for the block_note_editor. This could easily be a model: model and let the editor figure out which parameters it needs. Also it is way too structured to work for only documents.

But nothing to be done here. Just thinking aloud.

@akabiru
Copy link
Member Author

akabiru commented Nov 13, 2025

But I wonder if there's any risk to allow accessing the /edit page when the document is marked as collaborative (if the user manually types the URL to that page). Because if the document is saved on the CKEditor form then the data could become out of sync.

Nice catch! As we don't have the title edit flow yet, we should be okay to handle this in the upcoming inline title edit work. Also, since blocknote & ckeditor persist on different columns- should be ok in the interim?

@brunopagno
Copy link
Contributor

Nice catch! As we don't have the title edit flow yet, we should be okay to handle this in the upcoming inline title edit work. Also, since blocknote & ckeditor persist on different columns- should be ok in the interim?

That's not the case anymore. BlockNote (or, more specifically Hocuspocus) saves both binary and markdown. But I'm not worried while we're in dev cycle. But I believe we shouldn't release like this.

@akabiru
Copy link
Member Author

akabiru commented Nov 13, 2025

As we don't have the title edit flow yet,

That's not the case anymore. BlockNote (or, more specifically Hocuspocus) saves both binary and markdown. But I'm not worried while we're in dev cycle. But I believe we shouldn't release like this.

Agree, definitely we shouldn't (and wouldn't) release this way. I'll include this in the next PR! 👍🏾 WP: https://community.openproject.org/wp/69051

@akabiru akabiru merged commit 1c23942 into dev Nov 13, 2025
17 checks passed
@akabiru akabiru deleted the implementation/68723-redesign-document-show-page-for-collaborative-document-with-blocknote branch November 13, 2025 13:43
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants