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

Default note view in preview mode #352

Closed
probastaller opened this issue Aug 12, 2019 · 15 comments · Fixed by #747
Closed

Default note view in preview mode #352

probastaller opened this issue Aug 12, 2019 · 15 comments · Fixed by #747
Labels
enhancement New feature or request feature: editor Related to generic parts of the editor, e.g. loading/saving notes needs discussion Need to clarify if and how we should implement this
Milestone

Comments

@probastaller
Copy link

probastaller commented Aug 12, 2019

Describe the solution you'd like
I would like, if possible, to open the already written notes in preview formatted mode instead of edit mode. Or if it is not massive desirable, the option to chose default view in the settings would be great. In preview mode, links are clickable and text is cleaner and easier to read.

Thanks for your time :)

@probastaller probastaller added needs discussion Need to clarify if and how we should implement this enhancement New feature or request labels Aug 12, 2019
@zaphodus
Copy link

It would be improve usability

@frauhottelmann
Copy link

It woul increase the readability of the notes that already exist. The android app has a setting for this as well.

@goofus
Copy link

goofus commented Nov 5, 2019

That's exactly the feature I am missing. Please add an option to open existing Notes in View Mode!

@korelstar
Copy link
Member

After realizing #331, there is no differentiation between edit mode and preview mode anymore - there will be only one single mode. Hence, this setting would just be relevant for a short period of time.

@manfredu
Copy link

After realizing #331, there is no differentiation between edit mode and preview mode anymore - there will be only one single mode. Hence, this setting would just be relevant for a short period of time.

This does makes sense to me. Is there an estimation when #331 will be realized?

@korelstar
Copy link
Member

No, sorry. We hadn't enough free time for this, yet.

I would accept a PR for a default view mode setting as interim solution, though.

@korelstar korelstar added the feature: editor Related to generic parts of the editor, e.g. loading/saving notes label Feb 19, 2020
@Baptistou
Copy link

After realizing #331, there is no differentiation between edit mode and preview mode anymore - there will be only one single mode. Hence, this setting would just be relevant for a short period of time.

There are still some differences between the two modes :

  • Line endings are rendered in edit mode but preview mode requires 2 consecutive line endings to end a paragraph.
  • Markdown Tables are rendered in preview mode but not in edit mode.
  • Preview mode prevents you to modify a note accidentally.

Therefore, a default setting is still relevant.

@arkadym
Copy link

arkadym commented Apr 6, 2021

After realizing #331, there is no differentiation between edit mode and preview mode anymore - there will be only one single mode. Hence, this setting would just be relevant for a short period of time.

Yes, it is cool one, but still is not exaclty what we are discussing here, i still prefer able to see notes in preview mode by default.
Btw, #331 is missing tables support feature.

@Fuseteam
Copy link

Fuseteam commented May 7, 2021

this would a nice setting, where should one look to add the settings? how does one test?

@korelstar
Copy link
Member

I think the following steps have to be done:

  • PHP backend: add new setting viewMode in NotesService (like the existing setting fileSuffix, use values edit und preview)
  • JS frontend settings: add drop-down for changing that setting in AppSettings
  • JS frontend note: load setting from store in Note and process it.

Unfortunately, we currently have no GUI tests, but syntax and code style checks (run make lint).

@Fuseteam
Copy link

Cool thanks for explaining, with test i mean more in the sense of seeing the changes i made

@korelstar
Copy link
Member

I'm not sure if I understand you correctly. You will have to run make build-js and replace the notes app for in your Nextcloud installation. Then, if you chose the setting view, notes should open directly in preview mode, otherwise the behavior should like before.

@Fuseteam
Copy link

ah build with make build-js and replace it in nextcloud, thanks that's what i wanted to know

@Baptistou
Copy link

Baptistou commented May 13, 2021

For those interested in this default setting and waiting for it to be implemented, I use the following workaround script with JSLoader. When Notes app loads a page, this script triggers CTRL + / and thus switches to preview mode.

document.addEventListener("DOMNodeInserted",function(event){
    if(event.relatedNode.matches(".app-notes #app-content-vue"))
        document.dispatchEvent(new KeyboardEvent("keydown",{"key": "/","ctrlKey": true}));
});

@korelstar
Copy link
Member

Implementation is in #747, please have a look 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature: editor Related to generic parts of the editor, e.g. loading/saving notes needs discussion Need to clarify if and how we should implement this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants