Skip to content
Snippets Groups Projects
Commit c42dc401 authored by Sebastian Mohr's avatar Sebastian Mohr
Browse files

Changelog now follows the keep a changelog format

parent 7f60ed73
Branches
No related tags found
No related merge requests found
docs:
image: nikolaik/python-nodejs:python3.9-nodejs16-alpine
stage: deploy
before_script:
- apk add --no-cache build-base g++ cairo-dev jpeg-dev pango-dev giflib-dev
- apk add --update musl-dev gcc libffi-dev
- apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing libmount ttf-dejavu ttf-droid ttf-freefont ttf-liberation fontconfig
script:
- pip install -r docs/requirements.txt
- npm cache clean --force
- npm install -g typedoc
- npm i -g npm
- npm --build-from-source install canvas
- npm install
- npm audit fix
- cd docs
- sphinx-build -b html "." "../public"
artifacts:
paths:
- public
only:
- main
# Changelog
# 1.6.0 All notable changes to this project will be documented in this file.
- (Feature) Frontpage now detects if user is logged in
- If user is logged in, the frontpage will show a user's books button instead of login The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- (Feature) Added an indicator for the currently online users and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- The indicator is shown in the sidebar on the right side of each page preview if another user is currently viewing the page
- On hover it shows the email of the user
- (Feature) Profile page has some functionality now ## [Unreleased]
- User may change their email (requires email verification)
- User may change their password (requires email verification) ### Added
- User may set the default values for the different tools
- (Feature) Bye Bye ugly navbar - Frontpage now detects if the user is logged in.
- Opted to remove the global navbar as it only showed duplicate information - If the user is logged in, the frontpage will show a user's books button instead of login.
- The sidebar should now be used for the main navigation - Added an indicator for currently online users.
- (Feature) Clicking on the header of an snip now gives more information about the snip - The indicator is shown in the sidebar on the right side of each page preview if another user is currently viewing the page.
- This includes: snip type, width, height and creation date - On hover, it shows the email of the user.
- (Feature) Text tool now has an alignment submenu item - Profile page has some functionality now.
- Allows to align snippet to top, center, bottom, left, center, right of page - User may change their email (requires email verification).
- (Feature) Image placement tool now has an alignment submenu item - User may change their password (requires email verification).
- Allows to align snippet to top, center, bottom, left, center, right of page - User may set default values for the different tools.
- (Feature) The page move tool now has auto fit width and height buttons - Removed the global navbar.
- This will automatically fit the page to the width or height of your screen - Opted to use the sidebar for main navigation.
- (Feature) Users are now notified on bad connections - Clicking on the header of a snip now gives more information about the snip.
- (Dev) We now partially use app router instead of pages router - This includes: snip type, width, height, and creation date.
- smaller bundle size - Text tool now has an alignment submenu item.
- faster page transitions - Allows aligning the snippet to top, center, bottom, left, center, or right of the page.
- (Dev) Split up codebase into multiple independent packages - Image placement tool now has an alignment submenu item.
- allows for easier testing - Allows aligning the snippet to top, center, bottom, left, center, or right of the page.
- allows for easier development - Page move tool now has auto-fit width and height buttons.
- this is a quite significant change! - Automatically fits the page to the width or height of your screen.
- (Dev) Added validation for env parameters - Users are now notified on bad connections.
- catch missing env parameters early!
- (Dev) Added BackgroundTypes database service
- (Dev) Added dedicated server for email sending ### Changed
- (Dev) Maintenance page handler, if the app is down you will know now
- (Fix) Fixed canvas render width/height issue on devices with devicePixelRatio!=1 - We now partially use app router instead of pages router.
- see [#74](https://gitlab.gwdg.de/irp/snip/-/issues/74) - Smaller bundle size.
- (Fix) Verify/Reset Password emails look a bit better now (css added) - Faster page transitions.
- (Fix) Gird view overflow on long book names now shows as ellipsis - Split up codebase into multiple independent packages.
- (Fix) Sometimes the page flickered on resize this was because the page was resized before canvas - Easier testing.
- Easier development.
# 1.5.3 - Significant change!
- (Dev) Refactor email functions - Changelog now follows the Keep a Changelog format.
- (Dev) Graceful quit for prebuild script
- (Dev) Upgraded from buster to bookworm docker image ### Added
- (Fix) Fixed a bug in the server side render pipeline (textBaseline was wrong)
- see https://github.com/Automattic/node-canvas/issues/2343 - Added validation for env parameters.
- Catch missing env parameters early!
# 1.5.2 - Added BackgroundTypes database service.
- (Fix) Unauthorized screen layout was broken - Added dedicated server for email sending.
- (Dev) Refactor upload endpoint - Maintenance page handler, if the app is down you will know now.
- (Fix) Updated API Usage docs
- updated example scripts for upload ### Fixed
- (Feature) Test mode for testing uploads
- Fixed canvas render width/height issue on devices with devicePixelRatio != 1.
# 1.5.1 - See [#74](https://gitlab.gwdg.de/irp/snip/-/issues/74).
- (Feature) Page search in viewer is now fully functional - Verify/Reset Password emails look better now (CSS added).
- Search is case insensitive - Grid view overflow on long book names now shows as ellipsis.
- Allows for modifiers (snip types, page numbers, etc.) - Fixed page flickering on resize.
- see docs for more info
- (Fix) Reset password screen alignment was broken
- (Fix) Verify email screen alignment was broken ## [1.5.3]
- (Fix) Overflow was always shown in chrome this yielded a white line at the bottom of the page
### Changed
# 1.5.0
- (Feature) Added interaction mode (small eye icon) - Refactored email functions.
- allows to copy and past texts - Graceful quit for prebuild script.
- allows to interact with snips which have event handlers - Upgraded from Buster to Bookworm Docker image.
- e.g. on_click
- at the moment there are no snips with feedback but the framework is there ### Fixed
- (Dev) Refactor of overlay modules (related to above)
- (Dev) Text edit tool uses the new overlay modules - Fixed a bug in the server-side render pipeline (textBaseline was wrong).
- See [#2343](https://github.com/Automattic/node-canvas/issues/2343).
# 1.4.4
- (Dev) Refactor of tools to reduce some code duplication ## [1.5.2]
- (Docs) Split the developer docs into deployment and developer guides
- Also fixes some old docs, where things just changed ### Fixed
- Added to developer guides
- snip documentation - Unauthorized screen layout was broken.
- tool documentation - Refactor upload endpoint.
- Parsing of links was broken if they ended with `.md` or `.mdx` - Updated API Usage docs.
- (Deployment) Docker entrypoint now automatically checks for database migration - Updated example scripts for upload.
# 1.4.3 ### Added
- (Fix) Fixed bug with draw interpolation - Test mode for testing uploads.
- On canvas leave the line would be drawn to left top corner because of inserting null values
- Do not draw null values
- (Fix) Logout not handled gracefully ## [1.5.1]
# 1.4.2 ### Added
- (Fix) Strange scroll behavior in edit page - Page search in viewer is now fully functional.
- (Features) Read only mode - Search is case insensitive.
- tools are dynamically picked by access level - Allows for modifiers (snip types, page numbers, etc.).
- see new field in /book/:id/edit/access - See docs for more info.
- (Fix) Fixed a bug where the snips to place where not updated when a user adds a new snip
- (Fix) Overlay sometimes persisted on page change ### Fixed
- (Feature) Reenabled old live updates for drawing (might be disabled again depending on performance)
- Reset password screen alignment was broken.
# 1.4.1 - Verify email screen alignment was broken.
- Overflow was always shown in Chrome yielding a white line at the bottom of the page.
- (Fix) Fixed some alignment problems with the frontpage on mobile devices
- (Feature) Added pointer events instead of mouse events ## 1.5.0
- This should fix some problems with touch devices
- This applies to the resizer, move tool, draw tool and text tool ### Added
# 1.4.0 - Interaction mode (small eye icon).
- Allows copying and pasting texts.
- (Feature) We have a frontpage now! It explains the features of the app and helps new users get started. - Allows interacting with snips that have event handlers.
- (Feature) Pen line smoothing #28 - E.g. on_click.
- New Slider to adjust smoothing - Currently, no snips have feedback, but the framework is there.
- Ramer-Douglas-Peucker algorithms for simplification of the polyline with additional splines for drawing.
- (Feature) User settings #29 ### Changed
- Settings are saved for each user in the database
- Settings are synced across devices - Refactor of overlay modules (related to above).
- This only happens on page reload or focus change as everything else is confusing if using multiple tabs - Text edit tool uses the new overlay modules.
- Settings include:
- Zoom level(s)
- Font, Font size, Line height, Line Wrap ## [1.4.4]
- Pen color, pen size
- (Feature) Added background gradient to page viewer ### Changed
- (Fix) Fixed a bug where the page was setup multiple times by the worker
- (Dev) Fonts are now dynamically injected into the page - Refactor of tools to reduce some code duplication.
- This makes the process of adding fonts much easier - Split the developer docs into deployment and developer guides.
- Has no effect on the user - Also fixed some old docs.
- Added to developer guides:
# 1.3.4 - Snip documentation.
- Tool documentation.
- (Fix) Chrome range slider looked different than other browsers - Parsing of links was broken if they ended with `.md` or `.mdx`.
- (Fix) Zoom rounding error #61
- (Fix) Tab change sometimes produced an empty page i.e. force rerender on activity change ### Added
# 1.3.3 - Docker entrypoint now automatically checks for database migration.
- (Feature) Added modal to configure pdf download ## [1.4.3]
- Option to download with page numbers
- Option to only download selected pages ### Fixed
- (Fix) Adjusted styling of page number in sidebar of book viewer
- (Fix) Fixed bug with resizer using manual input or mouse wheel #61 - Fixed bug with draw interpolation.
- (Fix) Show finished books by default #60 - On canvas leave, the line would be drawn to the left top corner due to inserting null values.
- (Fix) Fixed tool not changing anymore in textarea on typing "p" or "m" #56 - Do not draw null values.
- Logout not handled gracefully.
# 1.3.2
- (Feature) New book browser ## [1.4.2]
- Folder sorting
- Drag and drop to sort folders ### Added
- Book sorting
- Sort by title, last modified, date added, and num pages - Read-only mode.
- Tools are dynamically picked by access level.
# 1.3.1 - See new field in `/book/:id/edit/access`.
- (Feature) Image compression ### Fixed
- Added script to compress all images, see `scripts` folder
- Added auto image compression for file uploads - Strange scroll behavior in edit page.
- WebP support for images - Fixed a bug where the snips to place were not updated when a user adds a new snip.
- (Feature) Added maintenance mode - Overlay sometimes persisted on page change.
- Redirects all requests to maintenance.html page - Re-enabled old live updates for drawing (might be disabled again depending on performance).
- Started by putting COMMAND=maintenance in .env file
## [1.4.1]
### Fixed
- Fixed some alignment problems with the frontpage on mobile devices.
### Added
- Added pointer events instead of mouse events.
- Should fix some problems with touch devices.
- Applies to the resizer, move tool, draw tool, and text tool.
## [1.4.0]
### Added
- We have a frontpage now! It explains the features of the app and helps new users get started.
- Pen line smoothing.
- New slider to adjust smoothing.
- Ramer-Douglas-Peucker algorithms for simplification of the polyline with additional splines for drawing.
- User settings.
- Settings are saved for each user in the database.
- Settings are synced across devices.
- Sync happens on page reload or focus change to avoid confusion when using multiple tabs.
- Settings include:
- Zoom levels.
- Font, font size, line height, line wrap.
- Pen color, pen size.
- Added background gradient to page viewer.
### Fixed
- Fixed a bug where the page was setup multiple times by the worker.
### Changed
- Fonts are now dynamically injected into the page.
- Makes the process of adding fonts easier.
- Has no effect on the user.
## [1.3.4]
### Fixed
- Chrome range slider looked different than other browsers.
- Zoom rounding error.
- Tab change sometimes produced an empty page, forcing rerender on activity change.
## [1.3.3]
### Added
- Added modal to configure PDF download.
- Option to download with page numbers.
- Option to only download selected pages.
### Fixed
- Adjusted styling of page number in the sidebar of the book viewer.
- Fixed bug with resizer using manual input or mouse wheel.
- Show finished books by default.
- Fixed tool not changing anymore in textarea on typing "p" or "m".
## [1.3.2]
### Added
- New book browser.
- Folder sorting.
- Drag and drop to sort folders.
- Book sorting.
- Sort by title, last modified, date added, and number of pages.
## [1.3.1]
### Added
- Image compression.
- Added script to compress all images (see `scripts` folder).
- Added auto image compression for file uploads.
- WebP support for images.
- Maintenance mode.
- Redirects all requests to `maintenance.html` page.
- Started by putting `COMMAND=maintenance` in `.env` file.
## old
There are no changelogs for versions before 1.3.1.
[Unreleased]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.5.3...HEAD
[1.5.3]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.5.2...v1.5.3
[1.5.2]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.5.1...v1.5.2
[1.5.1]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.5.0...v1.5.1
[1.5.0]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.4.4...v1.5.0
[1.4.4]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.4.3...v1.4.4
[1.4.3]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.4.2...v1.4.3
[1.4.2]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.4.1...v1.4.2
[1.4.1]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.4.0...v1.4.1
[1.4.0]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.3.4...v1.4.0
[1.3.4]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.3.3...v1.3.4
[1.3.3]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.3.2...v1.3.3
[1.3.2]: https://gitlab.gwdg.de/irp/snip/-/compare/v1.3.1...v1.3.2
...@@ -218,8 +218,15 @@ function LatencyProblemsModal() { ...@@ -218,8 +218,15 @@ function LatencyProblemsModal() {
const [_show, setShow] = useState(null); const [_show, setShow] = useState(null);
const mean = useMemo(() => { const mean = useMemo(() => {
if (history.length < 5) return 0; if (history.length < 5) return 0;
const mean = history.reduce((a, b) => a + b, 0) / history.length; const sortedHistory = [...history].sort((a, b) => a - b);
return Math.round(mean); const middleIndex = Math.floor(sortedHistory.length / 2);
const median =
sortedHistory.length % 2 === 0
? (sortedHistory[middleIndex - 1] +
sortedHistory[middleIndex]) /
2
: sortedHistory[middleIndex];
return median;
}, [history]); }, [history]);
function toggle() { function toggle() {
......
...@@ -20,7 +20,6 @@ import { ...@@ -20,7 +20,6 @@ import {
} from "../common/overlay"; } from "../common/overlay";
import { ItemSmall, Submenu } from "../common/submenu"; import { ItemSmall, Submenu } from "../common/submenu";
import { Toggle } from "../common/toggle"; import { Toggle } from "../common/toggle";
import { useMoveToolContext } from "../move/context";
import { useToolbarContext } from "../toolbar"; import { useToolbarContext } from "../toolbar";
import { ToolComponents, ToolSubmenuProps, ToolToggleProps } from "../types"; import { ToolComponents, ToolSubmenuProps, ToolToggleProps } from "../types";
import { TextToolContextProvider, useTextToolContext } from "./context"; import { TextToolContextProvider, useTextToolContext } from "./context";
......
...@@ -260,8 +260,8 @@ export class SnipService implements SnipStrategy { ...@@ -260,8 +260,8 @@ export class SnipService implements SnipStrategy {
snipData.type, snipData.type,
data_json, data_json,
view_json, view_json,
snipData.id,
snipData.created_by, snipData.created_by,
snipData.id,
]) ])
.then(check_mariadb_warning) .then(check_mariadb_warning)
.then((res) => { .then((res) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment