Skip to content

Commit

Permalink
Apply Prettier and update deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
margni-stephen committed Jul 9, 2020
1 parent 97f0d0a commit 0624974
Show file tree
Hide file tree
Showing 42 changed files with 17,054 additions and 16,362 deletions.
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
version: 2.1
orbs:
react: thefrontside/[email protected]
react: thefrontside/[email protected]
workflows:
push:
jobs:
- react/install
- react/eslint:
requires:
- react/install
- react/test:
requires:
- react/install
- react/coverage:
requires:
push:
jobs:
- react/install
- react/eslint:
requires:
- react/install
- react/test:
requires:
- react/install
- react/coverage:
requires:
- react/install
4 changes: 4 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"singleQuote": true
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: node_js
node_js:
- 14
- 14
30 changes: 16 additions & 14 deletions NOTEPAD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

## Listen For `beforeinstallprompt`

*Not currently available on iOS*
_Not currently available on iOS_

Possibly display an install banner at the bottom or an install button in the AppBar?

```javascript
window.addEventListener('beforeinstallprompt', (e) => {
// Don't show mini-infobar
e.preventDefault();
// Stash the event so it can be triggered later.
deferredPrompt = e;
// Update UI to promote PWA installation
pwaInstallAvailable(true);
// Don't show mini-infobar
e.preventDefault();
// Stash the event so it can be triggered later.
deferredPrompt = e;
// Update UI to promote PWA installation
pwaInstallAvailable(true);
});
```

Expand All @@ -38,11 +38,13 @@ Easier to do search on the client. Also free (outbound functions require a paid
Could potentially just use the enablePersistence error condition?

```js
firebase.firestore().enablePersistence({synchronizeTabs: false})
.catch(function(err) {
if (err.code == 'failed-precondition') {
// Multiple tabs open, persistence can only be enabled
// in one tab at a a time.
}
});
firebase
.firestore()
.enablePersistence({ synchronizeTabs: false })
.catch(function (err) {
if (err.code == 'failed-precondition') {
// Multiple tabs open, persistence can only be enabled
// in one tab at a a time.
}
});
```
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@

mNote is an extremely minimal note taking web app.

*© Margni Ltd. 2020*
_© Margni Ltd. 2020_

## About

This is built as a technical demonstration for a relatively simple React+Firebase PWA.

***Please note this is still a work in progress.***
**_Please note this is still a work in progress._**

### Features

- PWA
- Installable/service worker
- Works Offline
- Fast, minimal, native/app-like interface
- Dark theme support
- Uses Firestore realtime database to sync changes instantaneously
- Pin Notes
- Search Notes
- PWA
- Installable/service worker
- Works Offline
- Fast, minimal, native/app-like interface
- Dark theme support
- Uses Firestore realtime database to sync changes instantaneously
- Pin Notes
- Search Notes

### Appearance

Expand Down
90 changes: 45 additions & 45 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,67 @@

### New Functionality

- Use history api or routing. Essentially just respond to the back button.
- Other login options?
- Catch and log firestore and auth errors.
- Note sharing (Would be via email and only work if the use is already signed up for simplicity's sake).
- Just need to extend the security rules, could store a map of uid->email for shares.
- Share would allow collaboration, or viewing only?
- External text search (would be good as it would require using an external service such as Algolia).
- Show history of previous text searches (will also require a clear history option).
- Might it be a good idea to disable running multiple instances (i.e. over multiple tabs)?
- Delete account (i.e. clear all user data) ability.
- Should pinning and unpinning change the update time?
- Ability to attach files/images. Note that this could become an issue due to asset size.
- See storage, would need to either charge or severely restrict asset size.
- Attach links may also be an option, rather than store the file.
- Encrypt note content so that only the creator can read it.
- Tag notes for organisation.
- Soft delete (i.e. move to trash and delete after 24 hours or similar).
- If the user creates a note, inputs some text and closes before the debounce executes the update the note will be deleted as it is still empty.
- Use history api or routing. Essentially just respond to the back button.
- Other login options?
- Catch and log firestore and auth errors.
- Note sharing (Would be via email and only work if the use is already signed up for simplicity's sake).
- Just need to extend the security rules, could store a map of uid->email for shares.
- Share would allow collaboration, or viewing only?
- External text search (would be good as it would require using an external service such as Algolia).
- Show history of previous text searches (will also require a clear history option).
- Might it be a good idea to disable running multiple instances (i.e. over multiple tabs)?
- Delete account (i.e. clear all user data) ability.
- Should pinning and unpinning change the update time?
- Ability to attach files/images. Note that this could become an issue due to asset size.
- See storage, would need to either charge or severely restrict asset size.
- Attach links may also be an option, rather than store the file.
- Encrypt note content so that only the creator can read it.
- Tag notes for organisation.
- Soft delete (i.e. move to trash and delete after 24 hours or similar).
- If the user creates a note, inputs some text and closes before the debounce executes the update the note will be deleted as it is still empty.

### Enhanced UX

- Enhance keyboard navigation and add shortcuts.
- Drawer menu.
- Scroll shadows.
- Service worker should produce dialogue when reload available.
- Delete confirmation dialogue.
- Long press on list.
- Offline Indicator.
- Install prompt/enhanced process.
- Note colours/icons/etc.
- Passive notifications (e.g. when a new note is deleted).
- Multi-lingual (especially considering there is so little text to translate).
- Rich editor (to allow perhaps caret style markdown editing, clickable links, etc.)
- Ability to explicitly toggle dark mode. (Perhaps add an options menu first.)
- Accessibility.
- Enhance keyboard navigation and add shortcuts.
- Drawer menu.
- Scroll shadows.
- Service worker should produce dialogue when reload available.
- Delete confirmation dialogue.
- Long press on list.
- Offline Indicator.
- Install prompt/enhanced process.
- Note colours/icons/etc.
- Passive notifications (e.g. when a new note is deleted).
- Multi-lingual (especially considering there is so little text to translate).
- Rich editor (to allow perhaps caret style markdown editing, clickable links, etc.)
- Ability to explicitly toggle dark mode. (Perhaps add an options menu first.)
- Accessibility.

### Visual

- FAB should slide off screen on scroll down and back on on scroll up.
- Animate reorder on pin/unpin.
- FAB should slide off screen on scroll down and back on on scroll up.
- Animate reorder on pin/unpin.

## Bugs

### High

- Open notes do not seem to receive remote updates.
- Open notes do not seem to receive remote updates.

### Medium

- Opening the app while offline results in a blank screen for a considerable amount of time.
- Opening the app while offline results in a blank screen for a considerable amount of time.

### Low
### Low

- On iOS new note's textarea is not focused (works as expected when editing existing).
- On iOS new note's textarea is not focused (works as expected when editing existing).

## Code Quality, CI, etc.

- Improve firebase encapsulation.
- Improve context usage.
- More tests.
- Tighten linting rules.
- Mutation testing; Stryker
- Deploy tags?
- Build icon font (instead of using icomoon)
- Improve firebase encapsulation.
- Improve context usage.
- More tests.
- Tighten linting rules.
- Mutation testing; Stryker
- Deploy tags?
- Build icon font (instead of using icomoon)
Loading

0 comments on commit 0624974

Please sign in to comment.