Commit Graph

337 Commits

Author SHA1 Message Date
Aman Harwara
71c7ee1bec feat: new revision history UI (#861) 2022-02-16 19:39:04 +05:30
Aman Harwara
5605baeb57 feat: add warning to note options menu if note size is >0.5mb (#851) 2022-02-07 20:38:19 +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
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
Mo
c1b7f60e35 feat: move save method into snjs controller (#809)
* feat: move editor save method to snjs note controller
2022-01-10 22:04:57 -06:00
Mo
987f5aebf4 chore: migrate note controllers to snjs 2022-01-06 11:03:45 -06: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
b57350c899 Revert "feat: native smart tags (#782)"
This reverts commit c3772e06b4.
2022-01-05 16:11:17 +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
Mo
0eeb9b7da1 refactor: rename note controller to note view controller 2021-12-27 22:56:21 -06:00
Mo
15aea42d4f chore: rename editor model to note controller 2021-12-27 18:46:56 -06:00
Mo
54e5fc9184 fix: associate new note with default editor 2021-12-27 18:23:53 -06:00
Mo
06fae3acda fix: debounce editor reloading to handle fast fire 2021-12-27 16:29:18 -06:00
Mo
c9e448c7b6 fix: focus new note on create (#791) 2021-12-27 15:42:48 -06:00
Mo
07678bbd32 fix: showing saving status on first load 2021-12-27 15:23:56 -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
Aman Harwara
94b9ff5032 fix: Account switcher icon proportions (#783) 2021-12-21 23:38:52 +05:30
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
dc9dc104c9 feat: Always show quick settings menu (#765) 2021-12-08 20:40:56 +05:30
Mo Bitar
a9f8e1cba6 fix: handle component tag selection 2021-12-06 13:20:45 -06:00
Mo Bitar
dbc4de9a0e fix: don't show saving status if template note inserted to be interactable with advanced editor 2021-12-06 11:17:15 -06:00
Aman Harwara
31c48af01c feat: Add "Pin selected notes" button to editor title bar (#760) 2021-12-06 14:47:35 +05:30
Mo Bitar
82ee0974c1 feat: snjs upgrade and fixes 2021-12-05 11:04:46 -06:00
Mo Bitar
1a138ef83d fix: remove redundant check in template 2021-12-02 13:07:28 -06:00
Laurent Senta
4d8ba3320a refactor: move tags to react (#753)
* refactor: move Tags list to react

* refactor: extract TagsListItem and simplify hooks

* refactor: remove comment & dead code

* fix: mobx warnings & safari bug

* fix: text select on non-safari

* fix: remove unecessary comments

* style: apply prettier format

* style: apply formatting on tags_view

* refactor: remove the angular tags rendering

* feat: add back the "select previous tag" behavior

* style: simplify code and avoid important

* style: remove note on state
2021-11-29 17:33:00 +01:00
Mo Bitar
6f3a749e52 fix: default to feature status entitled to avoid temporarily flashing error 2021-11-26 18:29:00 -06:00
Mo Bitar
ba4fbd1c0a fix: unmount component on destroy 2021-11-10 08:30:38 -06:00
Mo
fd6d83655c feat: Component toggleability and add toggleable components to quick settings menu (#707)
* feat: toggleable extensions

* fix: return all themes for quick settings

* chore: bump snjs deps

* feat: Use Switch component for toggle in Quick Settings Menu

* feat: Add toggleableComponents to footer_view

* refactor: Change "components" to "toggleableComponents"

* feat: Add checked state to component toggle in quick settings menu
2021-10-27 10:19:42 -05:00
Vardan Hakobyan
b898e886a5 feat: remove broadcasting Extensions Manager events from ComponentView (#703)
* feat: remove `broadcast` from `ComponentView`

As "Extensions Manager" is removed, the related events' broadcasting is not needed anymore

* fix: restore `manualDealloc`
2021-10-25 17:08:37 +04:00
Gorjan Petrovski
31222e1236 feat(preferences): extension modals into extension panes (#683)
* feat(preferences): show inline extensions in extensions pane

* wip

* wip

* refactor: convert ComponentView to React component

* refactor: convert ComponentView to React component

* chore: fix merge conflicts

* feat: don't show features whose `area` is "room", update modal items' icons in Preferences menu

* chore: fix TS error

* feat: don't show 2FA Manager in modal-based component

* feat: remove `ExtendedDataReloadComplete` event, since Extensions Manger is being removed from the app

* chore: avoid hardcoded values in svg image, optimize `if` condition

* chore: remove remnant comment

* fix: fix typescript errors

Co-authored-by: vardanhakobyan <vardan_live@live.com>
2021-10-25 12:45:36 +04:00
Mo
413fe47828 chore: update all dependencies (#699) 2021-10-22 14:47:41 -05:00
Mo
8d9b192b81 feat: remove extensions manager (#696)
* feat: remove extensions manager

* fix: remove unused code

Co-authored-by: Aman Harwara <amanharwara@protonmail.com>
2021-10-21 13:06:49 -05:00
Aman Harwara
397e4963bd feat: Update notes list options menu to new design (#687)
feat: Implement initial Menu component functionality.
2021-10-19 16:07:47 +00:00
Aman Harwara
3a4e2509af feat: Add "Export" and "Duplicate" buttons in notes options menu. (#688)
Co-authored-by: Mough <mo@standardnotes.org>
2021-10-19 15:43:20 +00:00
Aman Harwara
f9b15262c7 feat: Purchase "Create account" & "Sign in" flows and Floating label input (#672) 2021-10-19 14:50:42 +00:00
Aman Harwara
c8dc07d42b feat: Add quick settings menu with theme switcher and other changes (#673)
Co-authored-by: Mo Bitar <mo@standardnotes.org>
Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>
2021-10-19 04:28:46 +00:00
Aman Harwara
bbeab4f623 feat: Remove obselete code related to editor preferences (#691) 2021-10-17 10:54:02 -05:00
Aman Harwara
4ce9264572 fix: Reload textarea on spellcheck pref change (#690) 2021-10-17 08:10:41 -05:00
Antonella Sgarlatta
99b84e3cda fix: hide some account preferences sections 2021-10-13 11:23:58 -03:00
Aman Harwara
f1122f292e feat: New account menu and text input with icon & toggle (#665)
* feat: Add new icons

* Revert "feat: Add new icons"

This reverts commit 0acb403fe846dbb2e48fd22de35c3568c3cb4453.

* feat: Add new icons for account menu

* feat: Add new Icons

* feat: Add "currentPane" state to prefs view

* feat: Update account menu to new design

* feat: Add input component with icon & toggle

* fix: sync icon & function

* fix: Fix eye icon

* feat: Create re-usable checkbox

feat: Add "merge local" option

* feat: Allow using className on IconButton

* feat: Add disabled state on input

feat: Make toggle circle

* refactor: Move checkbox to components

* feat: Handle invalid email/password error

* feat: Implement new design for Create Account

* feat: Implement new account menu design

* feat: Add disabled option to IconButton

* feat: Set account menu pane from other component

* feat: Add 2fa account menu pane

feat: Add lock icon

* feat: Remove unnecessary 2FA menu pane

feat: Reset current menu pane on clickOutside

* feat: Change "Log in" to "Sign in"

* feat: Remove sync from footer

* feat: Change "Login" to "Sign in"

feat: Add spinner to "Syncing..."

refactor: Use then-catch-finally for sync

* feat: Use common enableCustomServer state

* feat: Animate account menu closing

* fix: Reset menu pane only after it's closed

* feat: Add keyDown handler to InputWithIcon

* feat: Handle Enter press in inputs

* Update app/assets/javascripts/components/InputWithIcon.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* Update app/assets/javascripts/components/InputWithIcon.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* refactor: Use server state from AccountMenuState

* Update app/assets/javascripts/components/AccountMenu/CreateAccount.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* Update app/assets/javascripts/components/AccountMenu/ConfirmPassword.tsx

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>

* feat: Use common AdvancedOptions

* feat: Add "eye-off" icon and toggle state

* feat: Allow undefined values

* refactor: Remove enableCustomServer state

* feat: Persist server option state

* feat: Add bottom-100 and cursor-auto util classes

refactor: Use bottom-100 and cursor-auto classes

* refactor: Invert ternary operator

* refactor: Remove unused imports

* refactor: Use toggled as prop instead of state

* refactor: Change "Log in/out" to "Sign in/out"

* refactor: Change "Login" to "Sign in"

* refactor: Remove hardcoded width/height

* refactor: Use success class

* feat: Remove hardcoded width & height from svg

* fix: Fix chevron-down icon

Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com>
Co-authored-by: Antonella Sgarlatta <antonella@standardnotes.org>
2021-10-08 11:18:31 -05:00
Gorjan Petrovski
bf3763300a fix: adjust footer element height so it doesn't produce a scrollbar (#663) 2021-10-04 17:52:33 +02:00
Aman Harwara
7dbfa2fde0 feat(preferences): Tools segment (#657) 2021-09-29 12:51:48 -05:00
Gorjan Petrovski
0e5692d8ab feat: slim account menu and icon buttons (#655)
* feat: footer icon for preferences menu

* feat: account footer icon

* feat: account menu icon and slimmed down account menu
2021-09-29 17:52:27 +02:00