Commit Graph

314 Commits

Author SHA1 Message Date
Aman Harwara
c1f1aa4c8d feat: remove vertical padding from change editor menu (#836) 2022-01-31 20:42:45 +05:30
Vardan Hakobyan
bf382ce0f8 feat: get editor icons and their colors from snjs (#828)
* feat: get editor icons and their colors from snjs

* feat: get icons and their tints from snjs

* fix: use IconType from snjs
2022-01-31 18:58:36 +04:00
Aman Harwara
0e00901f15 fix: note icons getting pushed by extra-long words (#835) 2022-01-31 19:20:48 +05:30
Mo
50c92619ce refactor: migrate remaining angular components to react (#833)
* refactor: menuRow directive to MenuRow component

* refactor: migrate footer to react

* refactor: migrate actions menu to react

* refactor: migrate history menu to react

* fix: click outside handler use capture to trigger event before re-render occurs which would otherwise cause node.contains to return incorrect result (specifically for the account menu)

* refactor: migrate revision preview modal to react

* refactor: migrate permissions modal to react

* refactor: migrate password wizard to react

* refactor: remove unused input modal directive

* refactor: remove unused delay hide component

* refactor: remove unused filechange directive

* refactor: remove unused elemReady directive

* refactor: remove unused sn-enter directive

* refactor: remove unused lowercase directive

* refactor: remove unused autofocus directive

* refactor(wip): note view to react

* refactor: use mutation observer to deinit textarea listeners

* refactor: migrate challenge modal to react

* refactor: migrate note group view to react

* refactor(wip): migrate remaining classes

* fix: navigation parent ref

* refactor: fully remove angular assets

* fix: account switcher

* fix: application view state

* refactor: remove unused password wizard type

* fix: revision preview and permissions modal

* fix: remove angular comment

* refactor: react panel resizers for editor

* feat: simple panel resizer

* fix: use simple panel resizer everywhere

* fix: simplify panel resizer state

* chore: rename simple panel resizer to panel resizer

* refactor: simplify column layout

* fix: editor mount safety check

* fix: use inline onLoad callback for iframe, as setting onload after it loads will never call it

* chore: fix note view test

* chore(deps): upgrade snjs
2022-01-30 19:01:30 -06:00
Aman Harwara
0ecbde6bac feat: improve change editor menu keyboard navigation (#831) 2022-01-30 20:28:35 +05:30
Aman Harwara
b932e2a45e feat: Add new "Change Editor" option to note context menu (#823)
* feat: add editor icon

* refactor: remove 'any' type and format

* refactor: move NotesOptions and add ChangeEditorOption

* refactor: fix type for using regular RefObject<T>

* feat: add hide-if-last-child util class

* feat: add Change Editor option

* feat: make radio btn gray if not checked

* fix: accordion menu header and item sizing/spacing

* feat: add Escape key to KeyboardKey enum

* refactor: Remove Editor Menu

* feat: add editor select functionality

* refactor: move plain editor name to constant

* feat: add premium editors with modal if no subscription

refactor: simplify menu group creation

* feat: show alert when switching to non-interchangeable editor

* fix: change editor menu going out of bounds

* feat: increase group header & editor item size

* fix: change editor menu close on blur

* refactor: Use KeyboardKey enum & remove else statement

* feat: add keyboard navigation to change editor menu

* fix: editor menu separators

* feat: improve change editor menu sizing & spacing

* feat: show alert only if editor is not interchangeable

* feat: don't show alert when switching to/from plain editor

* chore: bump snjs version

* feat: temporarily remove change editor alert

* feat: dynamically get footer height

* refactor: move magic number to const

* refactor: move constants to constants file

* feat: use const instead of magic number
2022-01-28 14:23:39 -06:00
Aman Harwara
36584b07bd fix: Notes list options menu getting hidden (#827) 2022-01-27 18:37:29 +05:30
Laurent Senta
7726b1249c feat: display folders even without the premium (#826) 2022-01-26 09:21:24 +01:00
Aman Harwara
da1d4f75c8 feat: Add "Appearance" pane to preferences (#816)
Co-authored-by: Mo <mo@standardnotes.com>
2022-01-19 19:41:04 +05:30
Mo
c232a5e3c6 fix: dev account server 2022-01-17 10:53:23 -06:00
Mo
5b99e5f90d fix: move dev account in useEffect 2022-01-15 12:07:59 -06:00
Mo
063c3b2fee feat: per-note spellcheck (#815)
* feat: per-note spellcheck control

* fix: remove fill from svg

* feat: move spellcheck pref into defaults preferences section

* fix: use faded css class instead of opacity

* feat: plus editor 1.6.0
2022-01-14 14:32:16 -06:00
Vardan Hakobyan
a342a3a224 feat: add "Email Backups" to "Backups" section (#778)
* feat: add "Email Backups" to "Backups" section

* chore: remove comment

* chore: better wording

* chore: put working snjs version

* chore: better wording

* style: reuse existing css classes and add the missing one

* feat: add "No email backup" option

* refactor: move the function outside of the useEffect, remove unused utility function

* feat (WIP): move CloudLink to backups section

* chore: versions bump, type fixes

* fix: handle the case when the setting update fails

* style: remove dashed border from the confirmation code, UI improvements

* feat: implement removing integration, improve interaction on different events

* feat: implement non-interactive textarea for showing and copying the code

* fix: fix TS errors

* feat: implement "Perform backup" logic
- remove the code for copying the confirmation code for backup integration
- also remove unnecessary parameters passed to Provider

* feat: don't show "CloudLink" in preferences pane

* chore: show error in console on exception

* refactor: better naming, add `coverage` folder to gitignore

* fix: return correct setting name

* refactor: use async/await for the sake of consistency

* chore: remove duplicate line

* feat: get urls for cloud backup from snjs

* chore: update dependencies

* refactor: set both `token` and `frequency` settings when enabling cloud integration; get only `frequency` when checking the integration status

* refactor: once the setting is successfully saved, don't get its value from backend; instead, use its value that's still in frontend

* feat: move "Receive a notification email if a cloud backup fails." into cloud backups section

* fix: text correction

* fix: get correct cloud integration url from snjs based on prod/dev environment
2022-01-12 18:48:46 +04:00
Laurent Senta
7996f4e5a2 feat: nicer smart filters & folders theme (#795)
* fix: color add button and drop

* fix: color scrollbars

* fix: remove infinite scroll and fix scrollbars

* fix: plus icon center

* fix: navigation padding, structure simplif and naming

* fix: simplify scrollbars

* fix: scroll bar simplif + scheme in macos

* fix: magic variables to const

* refactor: extract panel ref state

* refactor: remove dead code, simple macos theme
2022-01-12 13:45:41 +01:00
Mo
561ebcadcf feat(dev): preload dev account from .env (#803) 2022-01-07 11:21:03 -06:00
Aman Harwara
875f5417be feat: Add option to toggle editor icon in new notes list design (#799) 2022-01-06 20:30:10 +05:30
Laurent Senta
285fe31dd8 fix: reload note counts (#797)
* fix: reload note counts

* fix: select smart tags on load
2022-01-06 09:00:36 +01:00
Karol Sójko
9ecfad92bb Revert "Revert "feat: allows duplicate names in tags folder & smart tags (#792)""
This reverts commit 122f8fc266.
2022-01-05 16:12:36 +01:00
Karol Sójko
80bf7baf16 Revert "Revert "feat: native smart tags (#782)""
This reverts commit b57350c899.
2022-01-05 16:12:22 +01:00
Karol Sójko
c42eeea383 Revert "Revert "feat: New notes list design (#780)""
This reverts commit d76c636e54.
2022-01-05 16:12:12 +01:00
Karol Sójko
d76c636e54 Revert "feat: New notes list design (#780)"
This reverts commit 7dd4a60595.
2022-01-05 16:11:34 +01:00
Karol Sójko
b57350c899 Revert "feat: native smart tags (#782)"
This reverts commit c3772e06b4.
2022-01-05 16:11:17 +01:00
Karol Sójko
122f8fc266 Revert "feat: allows duplicate names in tags folder & smart tags (#792)"
This reverts commit a165fa9b4e.
2022-01-05 16:11:00 +01:00
Laurent Senta
a165fa9b4e feat: allows duplicate names in tags folder & smart tags (#792)
* feat: tag rendering & validation uses hierarchy

* feat: add prefix to autocomplete
2022-01-04 14:13:29 +01:00
Laurent Senta
c3772e06b4 feat: native smart tags (#782)
* feat: introduce native smart tags

* feat: introduce react navigation

* feat: render smart tag special cases

* feat: add create tag & all count

* feat: move components to react + mobx

* fix: workaround issue with snjs

* feat: nice smart tag icons in experimental

* feat: add back components

* fix: typo on all tags

* feat: add panel resizer + simplif code

* fix: panel resize size & refresh

* fix: auto select all notes

* style: remove legacy tag view

* style: remove legacy directives

* fix: select tag from note view

* feat: WIP smart tag rename

* fix: template checks

* fix: user can create new notes

* panel: init width

* fix: panel resizer ref

* fix: update with new component viewer

* fix: use fixed isTemplateItem & fixed findItems

* refactor: rename tags panel into navigation

* style: remove TODOs that are ok

* feat: smart tag premium check with premium service

* refactor: multi-select variables for debuggability

* fix: clean deinit code

* fix: prevent trigger tag changes event for the same uuid

* fix: typings

* fix: use minimal state

* style: remove dead code

* style: long variable names

* refactor: move magic string to module

* fix: use smart filter feature

* refactor: add task id in todo
2022-01-04 14:02:58 +01:00
Aman Harwara
7dd4a60595 feat: New notes list design (#780) 2022-01-04 17:29:10 +05:30
Mo
954f39992d fix: display correct app version for desktop 2022-01-03 15:28:04 -06:00
Mo
4153c81638 fix: cloudlink url 2022-01-03 10:47:33 -06:00
Mo
66d8efd090 feat: native components (#789)
* wip: component viewer

* feat: get component status from component viewer

* feat: native components

* fix: remove unused property

* fix: remove unused func

* chore(deps): snjs 2.29.0

* fix: import location

* feat: native components

* fix: remove unused func

* feat: component viewer (#781)

* wip: component viewer

* feat: get component status from component viewer

* fix: remove unused property

* chore(deps): snjs 2.29.0

* fix: import location

* chore: use cp instead of webpack copy

* fix: types

* chore: misc
2021-12-30 14:25:40 -06:00
Mo
7f011d7288 fix: sanitize html string (#784) 2021-12-24 10:45:55 -06:00
Mo
ebdae31965 feat: component viewer (#781)
* wip: component viewer

* feat: get component status from component viewer

* fix: remove unused property

* chore(deps): snjs 2.29.0

* fix: import location
2021-12-24 10:41:02 -06:00
Laurent Senta
237cd91acd feat: implement tags folder as experimental feature (#788)
* feat: add tag folders support basics

* feat: add draggability to tags

* feat: add drag & drop draft

* feat: fold folders

* fix: do not select on fold / unfold tags

* style: clean the isValidTag call

* feat: add native folder toggle

* feat: add touch mobile support

* ui: add nicer design & icons

* style: render full-width tag items

* feat: nicer looking dropzone

* style: fix arguments

* fix: tag template rendering in list items

* feat: tag can be dragged over the whole item

* fix: cancel / reset title after save

* fix: disable drag completely when needed

* fix: invalid tag parents

* feat: add paying feature

* feat: with paid feature tooltip

* feat: tag has a plus feature

* feat: add premium modal

* style: simplif code

* refactor: extract feature_state & simplif code

* fix: icons and icons svg

* style: remove comment

* feat: tag folders naming

* feat: use the feature notification

* fix: tag folders copy

* style: variable names

* style: remove & clean comments

* refactor: remove is-mobile library

* feat: tags folder experimental (#10)

* feat: hide native folders behind experimental flag

* fix: better tags resizing

* fix: merge global window

* style: rename params

* refactor: remove level of indirection in feature toggle

* feat: recursively add tags to note on create (#9)

* fix: use add tags folder hierarchy & isTemplateItem (#13)

* fix: use new snjs add tag hierarchy

* fix: use new snjs isTemplateItem

* feat: tags folder premium (#774)

* feat: upgrade premium in tags section

refactor: move TagsSection to react

feat: show premium on Tag section

feat: keep drag and drop features always active

fix: drag & drop tweak with premium

feat: premium messages

fix: remove fill in svg icons

fix: change tag list color (temporary)

style: remove dead code

refactor: clarify names and modules

fix: draggable behind feature toggle

feat: add button in TagSection & design

* feat: fix features loading with app state (#775)

* fix: distinguish between app launch and start

* fix: update state for footer too

* fix: wait for application launch event

Co-authored-by: Laurent Senta <laurent@singulargarden.com>

* feat: tags folder with folder text design (#776)

* feat: add folder text

* fix: sn stylekit colors

* fix: root drop zone

* chore: upgrade stylekit

* fix: hide dropzone when feature is disabled

* chore: bump versions now that they are released

Co-authored-by: Mo <me@bitar.io>

* feat: tags folder design review (#785)

* fix: upgrade design after review

* fix: tweak dropzone

* fix: sync after assign parent

* fix: tsc error on build

* fix: vertical center the fold arrows

* fix: define our own hoist for react-dnd

* feat: hide fold when there are no folders

* fix: show children usability + resize UI

* fix: use old colors for now, theme compat

* fix: tweak alignment and add title

* fix: meta offset with folders

* fix: tweak tag size

* fix: observable setup

* fix: use link-off icon on dropzone

* fix: more tweak on text sizes

Co-authored-by: Mo <me@bitar.io>
2021-12-23 14:34:02 +01:00
Laurent Senta
4a5a202a37 Merge branch 'hotfix/10.3.2' into develop 2021-12-22 16:26:03 +01:00
Laurent Senta
80bd684e64 fix: tags do not count orphan refs 2021-12-22 16:22:00 +01:00
Aman Harwara
270fcbc3bc refactor: Move notes_view to React (#761) 2021-12-21 20:31:11 +05:30
Vardan Hakobyan
f120af3b43 feat: handle unprotected session expiration (#779)
* feat: hide note contents if the protection expires when the protected note is open and wasn't edited for a while

* feat: handle session expiration for opened protected note for both plain advanced editors

* fix: if after canceling  session expiry modal only one unprotected note stays selected, show its contents in the editor

* refactor: handle session expiration for opened protected note (move the logic to web client)

* feat: handle the case of selecting "Don't remember" option in session expiry dialog

* test (WIP): add unit tests for protecting opened note after the session has expired

* test: add remaining unit tests

* refactor: move the opened note protection logic to "editor_view"

* refactor: reviewer comments
- don't rely on user signed-in/out status to require authentication for protected note
- remove unnecessary async/awaits
- better wording on ui

* refactor: reviewer's comments:
 - use snjs method to check if "Don't remember" option is selected in authentication modal
 - move the constant to snjs
 - fix eslint error

* refactor: avoid `any` type for `appEvent` payload

* test: add unit tests

* chore: update function name

* refactor: use simpler protection session event types

* refactor: protected access terminology

* refactor: start counting idle timer after every edit (instead of counting by interval in spite of edits)

* test: unit tests

* style: don't give extra brightness to the "View Note"/"Authenticate" button on hover/focus

* chore: bump snjs version

* chore: put snjs "beta" version

* fix: run protection timeout when the note is marked as protected

* chore: snjs version bump

* refactor: immediately lock the note if it's marked as "Protected"

* refactor: rename component, directive and some props

* refactor: remove extra check

* refactor: rename the method

* chore: update snjs version

Co-authored-by: Mo Bitar <me@bitar.io>
2021-12-20 20:54:37 +04:00
Karol Sójko
2e168df929 Revert "feat: handle unprotected session expiration (#747)"
This reverts commit 8db549f6f6.
2021-12-15 15:26:31 +01:00
Vardan Hakobyan
8db549f6f6 feat: handle unprotected session expiration (#747)
* feat: hide note contents if the protection expires when the protected note is open and wasn't edited for a while

* feat: handle session expiration for opened protected note for both plain advanced editors

* fix: if after canceling  session expiry modal only one unprotected note stays selected, show its contents in the editor

* refactor: handle session expiration for opened protected note (move the logic to web client)

* feat: handle the case of selecting "Don't remember" option in session expiry dialog

* test (WIP): add unit tests for protecting opened note after the session has expired

* test: add remaining unit tests

* refactor: move the opened note protection logic to "editor_view"

* refactor: reviewer comments
- don't rely on user signed-in/out status to require authentication for protected note
- remove unnecessary async/awaits
- better wording on ui

* refactor: reviewer's comments:
 - use snjs method to check if "Don't remember" option is selected in authentication modal
 - move the constant to snjs
 - fix eslint error

* refactor: avoid `any` type for `appEvent` payload

* test: add unit tests

* chore: update function name

* refactor: use simpler protection session event types

* refactor: protected access terminology

* refactor: start counting idle timer after every edit (instead of counting by interval in spite of edits)

* test: unit tests

* style: don't give extra brightness to the "View Note"/"Authenticate" button on hover/focus

* chore: bump snjs version

Co-authored-by: Mo Bitar <me@bitar.io>
2021-12-14 19:14:01 +04:00
Mo
a15014f003 Component view refactor (#770)
* refactor: simplify component-view lifecycle callbacks

* fix: reintroduce exhaustive-deps
2021-12-13 11:16:14 -06:00
Aman Harwara
b29dc8ecc6 fix: Last sync date padding (#768) 2021-12-10 19:06:35 +05:30
Aman Harwara
24c6b831c6 feat: Multiple minor changes (#769) 2021-12-10 18:58:29 +05:30
Aman Harwara
024d44f1ff fix: Password toggle triggering on Enter when checkbox is focused (#767) 2021-12-09 23:18:52 +05:30
Aman Harwara
dc9dc104c9 feat: Always show quick settings menu (#765) 2021-12-08 20:40:56 +05:30
Johnny A
306441ed3a fix: note stats (#743)
* fix: note stats

* fix: show word count if note is plain or markdown

Co-authored-by: Johnny Almonte <johnny243@users.noreply.github.com>
2021-12-07 15:22:39 -04:00
Laurent Senta
c27dce1ab7 style: with prettier (#762)
* style: use pretty quick on staged files

* style: test edit utils

* style: try with lint-staged

* style: test lint application
2021-12-06 15:27:18 +01:00
Aman Harwara
31c48af01c feat: Add "Pin selected notes" button to editor title bar (#760) 2021-12-06 14:47:35 +05:30
Aman Harwara
d7c36da2b2 fix: Width transition on manually resizing sections (#759) 2021-12-03 19:41:13 +05:30
Mo Bitar
1a138ef83d fix: remove redundant check in template 2021-12-02 13:07:28 -06:00
Aman Harwara
9730006cba feat: Nativize "No distraction" theme as "Focus Mode" (#758)
Co-authored-by: Mo Bitar <me@bitar.io>
2021-12-02 22:34:57 +05:30
Vardan Hakobyan
a8f949e8c5 Chore/setup testing environment (#755)
* chore: setup environment for unit tests

* fix: remove extra character from json
2021-11-30 19:01:51 +04:00