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

feat: New Pages with Enhanced Document Editor Packages made over Editor Core 📝 #2784

Merged
merged 89 commits into from
Nov 20, 2023

Conversation

henit-chobisa
Copy link
Collaborator

@henit-chobisa henit-chobisa commented Nov 16, 2023

The New Pages with Enhanced Document Editor Package ✈️

image

Description

Plane used to have a block based document editor, where blocks can be added, reordered and issues could be linked, but for better convenience and user experience we strived to make a page editor similar to notion, which provides a better and more natural user experience to our users. This Pull Request represents the first version of the document editor, and there is a lot coming up in the roadmap. Let me walk you through the awesome new features of plane pages...

Features

Summary View

We wanted to plan pages, for any of the use cases, for documents of any length, hence we we introduced summary view for your super smooth navigation across the document, enhancing clarity and your productivity across the documents.
This is the first version of summary view, which includes navigation with only headings and subheadings.

In the next version of plane pages, we strive to take summary view to a next level, including

  • Any type of headings
  • Table Support for quick navigation across different types of tables scattered around your page
  • Todo and checkmark support for summary view
    and many more..............

Here is a glimpse of, how fun and smooth is summary view

ezgif-3-a140bc41f3

Markdown Support

Markdown is a crucial part of documentation, either it's a readme or creating an issue, it's everywhere, hence we focus a lot of markdown and now we have embedded markdown support for both copying from a page or pasting a markdown into the page, pages will auto format and structure everything according to the markdown format.

Copying Markdown from Pages, let's say to create a Github issue?

ezgif-3-cb056cf1b9

Ohh, you wanna paste some markdown text?? Say you have to paste add your Github change-logs / Contribution guidelines to pages?

ezgif-3-110c36a390

Slash Commands / Customisation Menu

Similar to the comment editor and issue editor inside plane which we are familiar with, pages comes with slash commands too, which can be triggered by / along with that it also comes with a top menu from where you can select any types of text formatting, we tried our best to cover all of our user's needs, whether you're coming from notion or you're coming from confluent like editors.

ezgif-3-76170f9745

Locking Pages

With pages, we had to ace collaboration, with this first version, we introduce you page_locking, say if you make a page and you want that page to be accessible by everyone but not editable, or you want that page to be editable and accessible you can you that. Let me take a below example where we have a user crew ( using dark theme ) and captain ( using light theme ), if captain makes a page and locks it, crew looses it's privileges to edit the page.

ezgif-3-bc21658dad

Shared / Private Pages

Now, there is locking the page, for restricting access to editing to users except the creator. But what about restricting access to view the page, to solve this problem, we came up with the concept of public and private pages, if you're page is public, that can be viewed by the people who are the part of your project. In future versions, we can also publish the pages, hence anyone with the link can access the page which you have shared.

You can see all the pages which you shared in your shared tab, while all the private pages, which are only visible to you will be seen in the private tab.

ezgif-2-b1fdc706e8

Favourite / Unfavourite Pages

You can favourite any page to mark it, with the proceeding versions of pages, we will have labels, which will provide a better experience filtering the pages, according to the labels.

ezgif-2-b89c42c089

Duplication of Pages

Often times, we need to make copy of documents. Pages releases this hustle by usage of the duplicate command, which you can use to make a copy of the existing page that you're seeing. Say a page is locked and you have to make a copy of the page, such that you can add your changes, you can simply do it .
ezgif-2-b063ab4abd

Archiving / Unarchiving

We never know, which document comes handy at what time, right? Hence, instead of delete, we added archives, if you think you're done with a page, just archive it. If you need it back later you can safely restore the old version or you can have a glimpse at that without restoring it back.
ezgif-2-812d7ba9ef

NarayanBavisetti and others added 30 commits October 6, 2023 12:00
Copy link
Collaborator

@rahulramesha rahulramesha left a comment

Choose a reason for hiding this comment

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

Most of the changes looks good to me... just couple of small comments.

export const AllPagesList: React.FC<TPagesListProps> = ({ viewType }) => {
const router = useRouter();
const { workspaceSlug, projectId } = router.query;
console.log("projectPages", projectPages);
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT( Not important though): please remove un wanted console logs

};

const handleEditPageModal = (e: any) => {
e.preventDefault();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't seem to do any logic for editing page, could you check why this is required?

Copy link
Contributor

Choose a reason for hiding this comment

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

This code is work in progress.

@sriramveeraghanta sriramveeraghanta marked this pull request as draft November 20, 2023 10:25
@sriramveeraghanta sriramveeraghanta marked this pull request as ready for review November 20, 2023 14:55
@sriramveeraghanta sriramveeraghanta changed the title [FEATURE] New Pages with Enhanced Document Editor Packages made over Editor Core 📝 feat: New Pages with Enhanced Document Editor Packages made over Editor Core 📝 Nov 20, 2023
@sriramveeraghanta sriramveeraghanta merged commit de58110 into develop Nov 20, 2023
9 of 12 checks passed
@sriramveeraghanta sriramveeraghanta deleted the feat/document-editor branch November 20, 2023 16:01
sriramveeraghanta added a commit that referenced this pull request Dec 7, 2023
…or Core 📝 (#2784)

* fix: page transaction model

* fix: page transaction model

* feat: updated ui for page route

* chore: initailized `document-editor` package for plane

* fix: format persistence while pasting markdown in editor

* feat: Inititalized Document-Editor and Editor with Ref

* feat: added tooltip component and slash command for editor

* feat: added `document-editor` extensions

* feat: added custom search component for embedding labels

* feat: added top bar menu component

* feat: created document-editor exposed components

* feat: integrated `document-editor` in `pages` route

* chore: updated dependencies

* feat: merge conflict resolution

* chore: modified configuration for document editor

* feat: added content browser menu for document editor summary

* feat: added fixed menu and editor instances

* feat: added document edittor instances and summary table

* feat: implemented document-editor in PageDetail

* chore: css and export fixes

* fix: migration and optimisation

* fix: added `on_create` hook in the core editor

* feat: added conditional menu bar action in document-editor

* feat: added menu actions from single page view

* feat: added services for archiving, unarchiving and retriving archived pages

* feat: added services for page archives

* feat: implemented page archives in page list view

* feat: implemented page archives in document-editor

* feat: added editor marking hook

* chore: seperated editor header from the main content

* chore: seperated editor summary utilities from the main editor

* chore: refactored necessary components from the document editor

* chore: removed summary sidebar component from the main content editor

* chore: removed scrollSummaryDependency from Header and Sidebar

* feat: seperated page renderer as a seperate component

* chore: seperated page_renderer and sidebar as component from index

* feat: added locked property to IPage type

* feat: added lock/unlock services in page service

* chore: seperated DocumentDetails as exported interface from index

* feat: seperated document editor configs as seperate interfaces

* chore: seperated menu options from the editor header component

* fix: fixed page_lock performing lock/unlock operation on queryset instead of single instance

* fix: css positioning changes

* feat: added archive/lock alert labels

* feat: added boolean props in menu-actions/options

* feat: added lock/unlock & archive/unarchive services

* feat: added on update mutations for archived pages in page-view

* feat: added archive/lock on_update mutations in single page vieq

* feat: exported readonly editor for locked pages

* chore: seperated kanban menu props and saved over passing redundant data

* fix: readonly editor not generating markings on first render

* fix: cheveron overflowing from editor-header

* chore: removed unused utility actions

* fix: enabled sidebar view by default

* feat: removed locking on pages in archived state

* feat: added indentation in heading component

* fix: button classnames in vertical dropdowns

* feat: added `last_archived_at` and `last_edited_at` details in editor-header

* feat: changed types for archived updates and document last updates

* feat: updated editor and header props

* feat: updated queryset according to new page query format

* feat: added parameters in page view for shared / private pages

* feat: updated other-page-view to shared page view && same with private pages

* feat: added page-view as shared / private

* fix: replaced deleting to archiving for pages

* feat: handle restoring of page from archived section from list view

* feat: made previledge based option render for pages

* feat: removed layout view for page list view

* feat: linting changes

* fix: adding mobx changes to pages

* fix: removed uneccessary migrations

* fix: mobx store changes

* fix: adding date-fns pacakge

* fix: updating yarn lock

* fix: removing unneccessary method params

* chore: added access specifier to the create/update page modal

* fix: tab view layout changes

* chore: delete endpoint for page

* fix: page actions, including- archive, favorite, access control, delete

* chore: remove archive page modal

* fix: build errors

---------

Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants