Skip to content

Commit

Permalink
Release v1.1.0 (#27)
Browse files Browse the repository at this point in the history
* Consider Option "Show completed to-dos"
closes #15
* Update workspace settings
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update version to v1.1.0
* Fix tabsPinToTabs command
To work from context menu and command palette
* Merge tabsPinToTabs command into tabsPinNote
* Improve updatePanelView() implementation
No functional changes
* Initial version
Reversed order of parents
* Small style changes
* Fix order of breadcrumbs + initial stylesheet
* Minor style improvements
* Add message to open folder
* Update README + CHANGELOG
* Finish breadcrumbs implementation and styles
* Update README.md
* Plugin repo (#21)
* Update webpack.config.js to latest version from plugin API
* Update to generator version v1.6.11
* Cleanup file structure + panel init message
* Update README.md
* Release v1.1.0
* Add option to specify breadcrumb max width
  • Loading branch information
benji300 committed Jan 12, 2021
1 parent b93960f commit 038a812
Show file tree
Hide file tree
Showing 15 changed files with 1,272 additions and 993 deletions.
16 changes: 14 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- None

## [1.1.0] - 2021-01-12

### Added

- Option `Show breadcrumbs below tabs` to show full breadcrumbs for selected note below tabs ([#17](https://github.com/benji300/joplin-note-tabs/issues/17))

### Changed

- Consider Option `View > Show completed to-dos` to display completed to-dos on tabs only if enabled ([#15](https://github.com/benji300/joplin-note-tabs/issues/15))
- Removed `tabsPinToTabs` command. `tabsPinNote` can now be used from context menu and command palette
- `tabsUnpinNote` command to work also with multiple selected notes

## [1.0.0] - 2021-01-06

### Added
Expand All @@ -19,10 +31,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- User option to automatically pin notes when edited ([#11](https://github.com/benji300/joplin-note-tabs/issues/11))
- Commands to switch between tabs ([#5](https://github.com/benji300/joplin-note-tabs/issues/5))
- Command to switch to last active tab ([#8](https://github.com/benji300/joplin-note-tabs/issues/8))
- Ability to pin note(s) from note list context menu ([#12](https://github.com/benji300/joplin-note-tabs/pull/12)
- Ability to pin note(s) from note list context menu ([#12](https://github.com/benji300/joplin-note-tabs/pull/12))
- Ability to pin note from editor context menu ([#9](https://github.com/benji300/joplin-note-tabs/pull/9) by [@ambrt](https://github.com/ambrt))
- Ability to pin note with double click on tab
- Ability to rearrange tabs by drag & drop ([#3](https://github.com/benji300/joplin-note-tabs/pull/3)
- Ability to rearrange tabs by drag & drop ([#3](https://github.com/benji300/joplin-note-tabs/pull/3))
- Can be deactivated via user option
- Ability to move unpinned tabs
- Description to place tabs to README ([#4](https://github.com/benji300/joplin-note-tabs/pull/4) by [@amandamcg](https://github.com/amandamcg))
Expand Down
137 changes: 55 additions & 82 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ It allows to open several notes at once in tabs and pin them to be kept open.

- [Features](#features)
- [Screenshots](#screenshots)
- [Commands](#Commands)
- [User options](#user-options)
- [Commands](#Commands)
- [User options](#user-options)
- [UI Tweaks](#ui-tweaks)
- [Installation](#installation)
- [Uninstallation](#uninstallation)
- [Feedback](#feedback)
Expand All @@ -23,6 +24,7 @@ It allows to open several notes at once in tabs and pin them to be kept open.
## Features

- Display selected note as tab
- Display full breadcrumbs for selected note below tabs
- Pin note(s) to the tabs
- Save pinned tabs permanently
- Stored in database (not synced with other devices!)
Expand All @@ -36,116 +38,87 @@ It allows to open several notes at once in tabs and pin them to be kept open.

![screencast](./assets/screencast.gif)

## Screenshots
### Screenshots

### Tabs above note content
#### Tabs above note content

![tabs-top-horizontal](./assets/tabs-top-horizontal.png)

### Tabs below note content
#### Tabs below note content

![tabs-bottom-horizontal](./assets/tabs-bottom-horizontal.png)

> **NOTE** - The used UI theme on this screenshot can be downloaded [here](https://github.com/benji300/joplin-wanaka-ui).
### Tabs beside note content (vertical layout)
#### Tabs beside note content (vertical layout)

![tabs-right-vertical](./assets/tabs-right-vertical.png)

> **NOTE** - The used UI theme on this screenshot can be downloaded [here](https://github.com/benji300/joplin-milford-ui).
### Commands
## Commands

This plugin provides the commands as described in the following chapters.
This plugin provides additional commands as described in the following table.

- Default keyboard shortcuts can be changed in user options
- Navigate to `Tools > Options > Keyboard Shortcuts` and search for the command label to be changed
| Command Label | Command ID | Description | Menu contexts |
| ------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| Tabs: Pin note | `tabsPinNote` | Pin selected note(s) to the tabs. | `Tools>Tabs`, `NoteListContext`,`EditorContext` |
| Tabs: Unpin note | `tabsUnpinNote` | Unpin selected note(s) from the tabs. | `Tools>Tabs` |
| Tabs: Switch to last active tab | `tabsSwitchLastActive` | Switch to the last active tab, i.e. to previous selected note. | `Tools>Tabs` |
| Tabs: Switch to left tab | `tabsSwitchLeft` | Switch to the left tab next to the active, i.e. select the left note. | `Tools>Tabs` |
| Tabs: Switch to right tab | `tabsSwitchRight` | Switch to the right tab next to the active, i.e. select the right note. | `Tools>Tabs` |
| Tabs: Move tab left | `tabsMoveLeft` | Move active tab one position to the left. | `Tools>Tabs` |
| Tabs: Move tab right | `tabsMoveRight` | Move active tab one position to the right. | `Tools>Tabs` |
| Tabs: Remove all pinned tabs | `tabsClear` | Remove all pinned tabs. In case no note is selected, the tabs list might be empty afterwards. | `Tools>Tabs` |

#### Pin to tabs
> **NOTE** - Keyboard shortcuts can be assigned in user options via `Tools > Options > Keyboard Shortcuts`. Search for the command label where shortcuts shall be added.
| Command Label | Command ID | Menu |
| ----------------- | --------------- | ------------------- |
| Tabs: Pin to tabs | `tabsPinToTabs` | `Note list context` |
> **NOTE** - All commands can also be accessed via the `Command palette`.
Pin note(s) to the tabs. Works with multiple selected notes.
## User options

#### Pin note
This plugin adds provides user options which can be changed via `Tools > Options > Note Tabs`.

| Command Label | Command ID | Menu |
| -------------- | ------------- | ---------------------------------- |
| Tabs: Pin note | `tabsPinNote` | `Tools > Tabs`<br>`Editor context` |

Pin the selected note to the tabs.

#### Unpin note

| Command Label | Command ID | Menu |
| ---------------- | --------------- | -------------- |
| Tabs: Unpin note | `tabsUnpinNote` | `Tools > Tabs` |

Unpin the selected note from the tabs.

#### Switch to last active tab

| Command Label | Command ID | Menu |
| ------------------------------- | ---------------------- | -------------- |
| Tabs: Switch to last active tab | `tabsSwitchLastActive` | `Tools > Tabs` |

Switch to the last active tab, i.e. to previous selected note.

#### Switch tab left

| Command Label | Command ID | Menu |
| ------------------------ | ---------------- | -------------- |
| Tabs: Switch to left tab | `tabsSwitchLeft` | `Tools > Tabs` |

Switch to the left tab next to the active, i.e. select the left note.

#### Switch tab right

| Command Label | Command ID | Menu |
| ------------------------- | ----------------- | -------------- |
| Tabs: Switch to right tab | `tabsSwitchRight` | `Tools > Tabs` |

Switch to the right tab next to the active, i.e. select the right note.

#### Move tab left

| Command Label | Command ID | Menu |
| ------------------- | -------------- | -------------- |
| Tabs: Move tab left | `tabsMoveLeft` | `Tools > Tabs` |

Move active tab one position to the left.

#### Move tab right

| Command Label | Command ID | Menu |
| -------------------- | --------------- | -------------- |
| Tabs: Move tab right | `tabsMoveRight` | `Tools > Tabs` |
> **NOTE** - If `default` is set for an advanced style setting, the corresponding default color, font family, etc. will be used to match the common App look.
Move active tab one position to the right.
> **NOTE** - In case color settings shall be overwritten, they must be specified as valid CSS attribute values, e.g. `#ffffff`, `rgb(255,255,255)`, etc.
#### Remove all pinned tabs
## UI Tweaks

| Command Label | Command ID | Menu |
| ---------------------------- | ----------- | -------------- |
| Tabs: Remove all pinned tabs | `tabsClear` | `Tools > Tabs` |
If option `Show breadcrumbs below tabs` is enabled in the settings it might be useful to disable the default breadcrumbs below the note title.
Follow these steps to hide it via the `userchrome.css` stylesheet:

Remove all pinned tabs. In case no note is selected, the tabs list might be empty afterwards.
- Open Joplin
- Navigate to `Tools > Options > Appearance` and open `Show Advanced Settings`
- Click `Edit` below `Custom stylesheet for Joplin-wide app styles` to open `userchrome.css` in a text editor
- Paste the following snippet into the file
- Save your changes and restart Joplin to see the changes

```css
.rli-editor
> div
> div
> div
> div[style^="padding-top: 10px; padding-bottom: 10px;"]
> button {
display: none !important;
}
```

### User options
> **NOTE** - Since there is currently no unique attribute for the breadcrumbs, this can only be done using the workaround from above. However, the behavior may change with each version and it may happen that it no longer works.
This plugin adds several user options which can be changed via `Tools > Options > Note Tabs`.
## Installation

> **NOTE** - If `default` is set for an advanced style setting, the corresponding default color, font family, etc. will be used to match the common App look.
### Joplin v1.6.4 and newer

> **NOTE** - In case color settings shall be overwritten, they must be specified as valid CSS attribute values, e.g. `#ffffff`, `rgb(255,255,255)`, etc.
- Open Joplin and navigate to `Tools > Options > Plugins`
- Search for `tabs` and press install
- Restart Joplin to enable the plugin

## Installation
### Joplin v1.6.2 and previous

- Download the latest released JPL package (`joplin-plugin-benji300-tabs.jpl`) from [here](https://github.com/benji300/joplin-note-tabs/releases)
- Open Joplin
- Navigate to `Tools > Options > Plugins`
- Open Joplin and navigate to `Tools > Options > Plugins`
- Press `Install plugin` and select the previously downloaded `jpl` file
- Confirm selection
- Restart Joplin to enable the plugin
Expand Down Expand Up @@ -173,9 +146,9 @@ By default the tabs will be on the right side of the screen, this can be adjuste
- :question: Need help?
- Ask a question on the [Joplin Forum](https://discourse.joplinapp.org/t/plugin-note-tabs/12752)
- :bulb: An idea to improve or enhance the plugin?
- [Request a new feature](https://github.com/benji300/joplin-note-tabs/issues) or upvote [popular feature requests](https://github.com/benji300/joplin-note-tabs/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement+sort%3Areactions-%2B1-desc+)
- Start a new discussion on the [Forum](https://discourse.joplinapp.org/t/plugin-note-tabs/12752) or upvote [popular feature requests](https://github.com/benji300/joplin-note-tabs/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement+sort%3Areactions-%2B1-desc+)
- :bug: Found a bug?
- File an issue on [GitHub](https://github.com/benji300/joplin-note-tabs/issues)
- Check the [Forum](https://discourse.joplinapp.org/t/plugin-note-tabs/12752) if anyone else already reported the same issue. Otherwise report it by yourself.

## Support

Expand Down
24 changes: 14 additions & 10 deletions api/JoplinPlugins.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,21 @@ export default class JoplinPlugins {
*/
register(script: Script): Promise<void>;
/**
* Registers a new content script. Unlike regular plugin code, which
* runs in a separate process, content scripts run within the main
* process code and thus allow improved performances and more
* customisations in specific cases. It can be used for example to load
* a Markdown or editor plugin.
* Registers a new content script. Unlike regular plugin code, which runs in
* a separate process, content scripts run within the main process code and
* thus allow improved performances and more customisations in specific
* cases. It can be used for example to load a Markdown or editor plugin.
*
* Note that registering a content script in itself will do nothing -
* it will only be loaded in specific cases by the relevant app modules
* (eg. the Markdown renderer or the code editor). So it is not a way
* to inject and run arbitrary code in the app, which for safety and
* performance reasons is not supported.
* Note that registering a content script in itself will do nothing - it
* will only be loaded in specific cases by the relevant app modules (eg.
* the Markdown renderer or the code editor). So it is not a way to inject
* and run arbitrary code in the app, which for safety and performance
* reasons is not supported.
*
* The plugin generator provides a way to build any content script you might
* want to package as well as its dependencies. See the [Plugin Generator
* doc](https://github.com/laurent22/joplin/blob/dev/packages/generator-joplin/README.md)
* for more information.
*
* * [View the renderer demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/content_script)
* * [View the editor demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/codemirror_content_script)
Expand Down
4 changes: 4 additions & 0 deletions api/JoplinViewsDialogs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export default class JoplinViewsDialogs {
* Sets the dialog HTML content
*/
setHtml(handle: ViewHandle, html: string): Promise<string>;
/**
* Adds and loads a new JS or CSS files into the dialog.
*/
addScript(handle: ViewHandle, scriptPath: string): Promise<void>;
/**
* Sets the dialog buttons.
*/
Expand Down
12 changes: 12 additions & 0 deletions api/JoplinViewsPanels.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,16 @@ export default class JoplinViewsPanels {
* Called when a message is sent from the webview (using postMessage).
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Shows the panel
*/
show(handle: ViewHandle, show?: boolean): Promise<void>;
/**
* Hides the panel
*/
hide(handle: ViewHandle): Promise<void>;
/**
* Tells whether the panel is visible or not
*/
visible(handle: ViewHandle): Promise<boolean>;
}
8 changes: 8 additions & 0 deletions api/JoplinWorkspace.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { FolderEntity } from '../../database/types';
import { Disposable } from './types';
declare enum ItemChangeEventType {
Create = 1,
Expand Down Expand Up @@ -53,6 +54,13 @@ export default class JoplinWorkspace {
* Gets the currently selected note
*/
selectedNote(): Promise<any>;
/**
* Gets the currently selected folder. In some cases, for example during
* search or when viewing a tag, no folder is actually selected in the user
* interface. In that case, that function would return the last selected
* folder.
*/
selectedFolder(): Promise<FolderEntity>;
/**
* Gets the IDs of the selected notes (can be zero, one, or many). Use the data API to retrieve information about these notes.
*/
Expand Down
Loading

0 comments on commit 038a812

Please sign in to comment.