readme additions + bugfixes

This commit is contained in:
dragonwocky 2020-08-19 00:13:14 +10:00
parent 934b3093bb
commit 19bf587b8a
Signed by: dragonwocky
GPG Key ID: C7A48B7846AA706D
5 changed files with 221 additions and 52 deletions

View File

@ -24,10 +24,7 @@ complete rewrite with node.js.
- extension: "emoji sets" = pick from a variety of emoji styles to use. - extension: "emoji sets" = pick from a variety of emoji styles to use.
- extension: "night shift" = sync dark/light theme with the system (overrides normal theme setting). - extension: "night shift" = sync dark/light theme with the system (overrides normal theme setting).
- extension: "right-to-left" = enables auto rtl/ltr text direction detection. (ported from [github.com/obahareth/notion-rtl](https://github.com/obahareth/notion-rtl).) - extension: "right-to-left" = enables auto rtl/ltr text direction detection. (ported from [github.com/obahareth/notion-rtl](https://github.com/obahareth/notion-rtl).)
- extension: "weekly view" = calendar views named "weekly" will show only the 7 days of this week. (ported from [github.com/adihd/notionweeklyview](https://github.com/adihd/notionweeklyview).) - extension: "weekly view" = calendar views named "weekly" will show only the 7 days of this week. (ported from [github.com/adihd/notionweeklyview](https://github.com/adihd/notionweeklyview).)]
//todo
- extension: "property layout" = auto-collapse page properties that usually push down page content. (ported from [github.com/alexander-kazakov/notion-layout-extension](https://github.com/alexander-kazakov/notion-layout-extension).) - extension: "property layout" = auto-collapse page properties that usually push down page content. (ported from [github.com/alexander-kazakov/notion-layout-extension](https://github.com/alexander-kazakov/notion-layout-extension).)
### v0.7.0 (2020-07-09) ### v0.7.0 (2020-07-09)

259
README.md
View File

@ -1,50 +1,51 @@
# readme # notion-enhancer
ended up here? this is a wip version of the enhancer, and this file is yet to be completed. notion.so is a pretty awesome tool already, but there's always room for improvements.
if you're interested in using the project, switch back to the [master branch](https://github.com/dragonwocky/notion-enhancer). it might just be a preference, it might be something crucial to your setup,
for support, contact me on discord `dragonwocky#8449` or open an issue here in the repo. it might be something users have been asking for for a long time,
or it might even be something you haven't realised you need yet
\- there's something that would make your user experience a lot better.
notion.so's ui/ux is pretty awesome, but there's always room for improvement. this package is a mod-loader for the desktop app, with custom colour theming and extra feature enhancements.
this script enhances your experience, making the tool smoother to use and nicer on the eyes,
and adding some handy extra functionality too.
want to contribute? check the the [contribution guidelines](CONTRIBUTING.md). want to contribute? check out the [contribution guidelines](CONTRIBUTING.md) and the [documentation](DOCUMENTATION.md).
## installation ## installation
1. install node.js: [windows/macOS](https://nodejs.org/en/download/), [linux/WSL](https://github.com/mklement0/n-install). 1. install node.js: [windows/macOS](https://nodejs.org/en/download/), [linux/WSL](https://github.com/mklement0/n-install).
a computer restart may be required here. _a computer restart may be required here._
2. install notion-enhancer globally via yarn or npm: 2. install the enhancer globally: run `npm i -g notion-enhancer` in the terminal/command prompt.
`npm i -g notion-enhancer` or `yarn global add notion-enhancer` 3. make sure no notion processes are running (check the task manager!), and apply the hack:
3. ensure no notion processes are running (you may want to check the task manager to make sure), run `notion-enhancer apply` in the terminal/command prompt.
and try running one of these commands:
``` ### command-line interface
Usage:
$ notion-enhancer <command> [options]
Commands: ```
apply : add enhancements to the notion app Usage:
remove : return notion to its pre-enhanced/pre-modded state $ notion-enhancer <command> [options]
check : check the current state of the notion app
For more info, run any command with the `--help` flag: Commands:
$ notion-enhancer apply --help apply : add enhancements to the notion app
$ notion-enhancer remove --help remove : return notion to its pre-enhanced/pre-modded state
$ notion-enhancer check --help check : check the current state of the notion app
Options: For more info, run any command with the `--help` flag:
-y, --yes : skip prompts (may overwrite data) $ notion-enhancer apply --help
-h, --help : display usage information $ notion-enhancer remove --help
-v, --version : display version number $ notion-enhancer check --help
```
## supported clients Options:
-y, --yes : skip prompts (may overwrite data)
-h, --help : display usage information
-v, --version : display version number
```
### supported clients
- the [official windows/mac releases](https://notion.so/desktop). - the [official windows/mac releases](https://notion.so/desktop).
- the arch linux AUR [notion-app](https://aur.archlinux.org/packages/notion-app/) package. - the arch linux AUR [notion-app](https://aur.archlinux.org/packages/notion-app/) package.
- the linux [notion-app](https://github.com/jaredallard/notion-app) installer. - the linux [notion-app](https://github.com/jaredallard/notion-app) installer.
- the debian [notion-deb-builder](https://github.com/davidbailey00/notion-deb-builder/tree/229f2868e117e81858618783b83babd00c595000). - the debian [notion-deb-builder](https://github.com/davidbailey00/notion-deb-builder/).
(it can also be run from the wsl to apply enhancements to the windows app.) (it can also be run from the wsl to apply enhancements to the windows app.)
@ -53,33 +54,199 @@ want to contribute? check the the [contribution guidelines](CONTRIBUTING.md).
mobile clients are not supported and due to system limitations/restrictions cannot be. mobile clients are not supported and due to system limitations/restrictions cannot be.
## faq a chrome extension may be coming soon for web client support.
**is this against notion's terms of service? can i get in trouble for using it?** **is this against notion's terms of service? can i get in trouble for using it?**
definitely not! i contacted notion to check, and their response was awesome: definitely not! i contacted their support team to check, and the response was awesome:
"Thanks for taking the time to share this with us. Userscripts and userstyles are definitely "Thanks for taking the time to share this with us. Userscripts and userstyles are definitely
cool ideas and would be helpful for many users! ... I'll also share this with the rest of the cool ideas and would be helpful for many users! ... I'll also share this with the rest of the
team to take to heart for future improvements." team to take to heart for future improvements."
**can i enhance the web version of notion too?** ## features
yes, and no. styling can be copy/pasted into a web extension like once applied, modules can be configured via the graphical (filterable and searchable) menu, which can be opened from
[stylus](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne), the tray/menubar icon or with `CMD/CTRL+E`.
and some scripts could be used with greasemonkey (untested). however, most hacks
aren't in a form that can simply be ported for use in a browser.
after i've gotten to enhancer to a reasonably high level of robustness/functionalality/stableness, currently all modules come pre-installed for technical reasons, security assurance, and ease-of-use.
i may create a notion-enhancer chrome extension. these include:
### notion-enhancer core
**tags:** #core
**description:** the cli, modloader, menu, & tray.
**author**: [dragonwocky](https://github.com/dragonwocky/)
**version**: v0.8.0
| option | type | default |
| ---------------------------- | --------------------------------------------------------------------------------------------- | -------------------------- |
| hide app on open | toggle | no |
| auto-maximise windows | toggle | no |
| close window to the tray | toggle | yes |
| integrated titlebar | toggle | yes |
| height of frameless dragarea | number input | `15` |
| integrated scrollbars | toggle | yes |
| window display hotkey | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `CommandOrControl+Shift+A` |
![](https://user-images.githubusercontent.com/16874139/90519171-094e3900-e1ab-11ea-8c5d-529ca15c6d95.png)
### custom inserts
**tags:** #extension
**description:** link files for small client-side tweaks.
**author**: [dragonwocky](https://github.com/dragonwocky/)
**version**: v0.1.1
| option | type | default |
| --------------------- | ---- | ------- |
| css insert | file | none |
| client-side js insert | file | none |
### bracketed links
**tags:** #extension
**description:** render links surrounded with \[\[brackets]] instead of underlined.
**author**: [arecsu](https://github.com/arecsu/)
**version**: v0.1.0
### dark+
**tags:** #theme #dark
**description:** a vivid-colour near-black theme.
**author:** [dragonwocky](https://github.com/dragonwocky/)
**version:** v0.1.3
| option | type | default |
| -------------- | ----- | ------------------ |
| primary colour | color | `rgb(177, 24, 24)` |
![](https://user-images.githubusercontent.com/16874139/90520312-85954c00-e1ac-11ea-8c45-3894c13b9b71.png)
### emoji sets
**tags:** #extension
**description:** pick from a variety of emoji styles to use.
**author:** [dragonwocky](https://github.com/dragonwocky/)
**version:** v0.1.3
![](https://user-images.githubusercontent.com/16874139/90520622-f0df1e00-e1ac-11ea-8791-12922a037234.png)
### focus mode
**tags:** #extension
**description:** hide the titlebar/menubar if the sidebar is closed (will be shown on hover).
**author:** [arecsu](https://github.com/arecsu/)
**version:** v0.1.0
![](https://user-images.githubusercontent.com/16874139/90521792-49fb8180-e1ae-11ea-8764-cb4309cec464.png)
### gameish
**tags:** #theme #dark
**description:** a purple, "gamer-styled" theme with a blocky-font.
**author:** [LVL100ShrekCultist](https://reddit.com/user/LVL100ShrekCultist/)
**version:** v0.1.1
![](https://user-images.githubusercontent.com/16874139/90522144-b6768080-e1ae-11ea-8150-527c1f70f0e7.png)
### neutral
**tags:** #theme #dark
**description:** smoother colours and fonts, designed to be more pleasing to the eye.
**author:** [arecsu](https://github.com/arecsu/)
**version:** v0.1.0
![](https://user-images.githubusercontent.com/16874139/90522373-f9d0ef00-e1ae-11ea-9dba-b29431609210.png)
### night shift
**tags:** #extension #theme
**description:** sync dark/light theme with the system (overrides normal theme setting).
**author:** [dragonwocky](https://github.com/dragonwocky/)
**version:** v0.1.0
### pastel dark
**tags:** #theme #dark
**description:** a true dark theme with a hint of pastel.
**author:** [zenith_illinois](https://reddit.com/user/zenith_illinois/)
**version:** v0.1.0
![](https://user-images.githubusercontent.com/16874139/90522660-5502e180-e1af-11ea-8885-073ad20d65b3.png)
### property layout
**tags:** #extension
**description:** auto-collapse page properties that usually push down page content.
**author:** [alexander-kazakov](https://github.com/alexander-kazakov/)
**version:** v0.2.1
### right-to-left
**tags:** #extension
**description:** enables auto rtl/ltr text direction detection.
**author:** [obahareth](https://github.com/obahareth/)
**version:** v1.3.0
![](https://user-images.githubusercontent.com/16874139/90522872-95faf600-e1af-11ea-807c-11ac1591217e.png)
### weekly view
**tags:** #extension
**description:** calendar views named "weekly" will show only the 7 days of this week.
**author:** [adihd](https://github.com/adihd/)
**version:** v0.5.0
![](https://user-images.githubusercontent.com/16874139/90523679-86c87800-e1b0-11ea-8cc0-25f6825c6d49.png)
## contributors ## contributors
this project was started by [@TarasokUA](https://github.com/TarasokUA/) in early 2020. [@TarasokUA](https://github.com/TarasokUA/) wrote the first versions of this in python, in early 2020.
a couple months after, they decided they didn't have any motivation to continue work on it and a couple months after I ([@dragonwocky](https://github.com/dragonwocky/)) picked the project up, at first extending
the enhancer was picked up by [@dragonwocky](https://github.com/dragonwocky/). upon the original base and later moving to the javascript module system.
since then, various community members have helped out heaps here on github or in more extended since then, various community members have helped out heaps - some listed as
discussions on discord (with code, feedback and testing): [contributors](https://github.com/dragonwocky/notion-enhancer/graphs/contributors) here on github,
but many helping with code, feedback and testing on discord and in emails.
[![](https://contributors-img.web.app/image?repo=dragonwocky/notion-enhancer)](https://github.com/dragonwocky/notion-enhancer/graphs/contributors) individual modules have their original authors attributed.

View File

@ -136,8 +136,12 @@ module.exports = (store, __exports) => {
: list[0].target.style.width; : list[0].target.style.width;
if (new_sidebar_width !== sidebar_width) { if (new_sidebar_width !== sidebar_width) {
sidebar_width = new_sidebar_width; sidebar_width = new_sidebar_width;
electron.ipcRenderer.sendToHost('enhancer:sidebar-width'); electron.ipcRenderer.sendToHost(
'enhancer:sidebar-width',
sidebar_width
);
} }
} }
setSidebarWidth([{ target: document.querySelector('.notion-sidebar') }]);
} }
}; };

View File

@ -84,6 +84,7 @@ module.exports = {
})` })`
); );
el.style.setProperty('background-size', 'contain'); el.style.setProperty('background-size', 'contain');
el.style.setProperty('opacity', '1');
}); });
tweaked = true; tweaked = true;
} }

View File

@ -11,7 +11,7 @@ module.exports = {
tags: ['extension', 'theme'], tags: ['extension', 'theme'],
name: 'night shift', name: 'night shift',
desc: desc:
'sync dark/light theme with the system (overrides normal theme setting)', 'sync dark/light theme with the system (overrides normal theme setting).',
version: '0.1.0', version: '0.1.0',
author: 'dragonwocky', author: 'dragonwocky',
hacks: { hacks: {