Skip to content

Commit

Permalink
Merge pull request #39 from frysztak/release/v0.4.2
Browse files Browse the repository at this point in the history
v0.4.2 into master
  • Loading branch information
frysztak authored Jun 17, 2022
2 parents 02ed318 + 84d22f7 commit 6e45cc3
Show file tree
Hide file tree
Showing 17 changed files with 1,128 additions and 1,120 deletions.
74 changes: 48 additions & 26 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,103 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.4.2] - 2022-06-17

### Fixed

- Article page: fixed flashing "If you click on an article, it'll appear here." message
- Collections: navigate to homepage when deleting currently active collection
- Collection Icon Picker: highlight currently selected icon

### Changed

- Frontend: nicer "article not found" page
- Frontend: nicer colours in Card layout for light mode
- Backend: default value for `COOKIE_SECRET` env variable

## [0.4.1] - 2022-06-15

### Fixed

- Article page: remove SVG anchors from heading components
- Article page: remove SVG anchors from heading components

## [0.4.0] - 2022-06-12

### Added

- Feature: Reduced Docker image size from 478 MB to 126 MB (uncompressed)
- Feature: automatically detect RSS/Atom feed from URL
- Feature: automatically detect system color mode
- Feature: Reduced Docker image size from 478 MB to 126 MB (uncompressed)
- Feature: automatically detect RSS/Atom feed from URL
- Feature: automatically detect system color mode

### Changed

- Frontend: disable SSR
- Backend: migrate to Fastify 4
- Backend: improve compatibility with certain feeds
- Frontend: disable SSR
- Backend: migrate to Fastify 4
- Backend: improve compatibility with certain feeds

## [0.3.0] - 2022-06-04

### Added

- `.nvmrc` file
- Collection header: added menu, allowing to mark entire collection as read on mobile
- Article page: allow to select article width (narrow, wide, unlimited)
- `.nvmrc` file
- Collection header: added menu, allowing to mark entire collection as read on mobile
- Article page: allow to select article width (narrow, wide, unlimited)

### Changed

- Collection icon picker: increase size (of both popover and icons themselves), add tooltips
- Collection icon picker: increase size (of both popover and icons themselves), add tooltips

### Fixed

- Settings page: fix redirect on mobile
- PWA: clear CacheStorage on login/logout
- Article page: show 'go back' button when in mobile/tablet mode
- Panes: improve performance when opening modals
- Menu: fix disappearing shadow
- Settings page: fix redirect on mobile
- PWA: clear CacheStorage on login/logout
- Article page: show 'go back' button when in mobile/tablet mode
- Panes: improve performance when opening modals
- Menu: fix disappearing shadow

## [0.2.0] - 2022-05-22

### Added

- Auto-expand parent collection when adding children to it
- Support `DB_PASS_FILE` and `COOKIE_SECRET_FILE` env variables
- Auto-expand parent collection when adding children to it
- Support `DB_PASS_FILE` and `COOKIE_SECRET_FILE` env variables

### Changed

- Migrated to React 18 and Chakra UI v2
- Bumped all dependencies
- Migrated to React 18 and Chakra UI v2
- Bumped all dependencies

### Fixed

- About page: show short commit SHA
- Password page: disable form in demo mode
- Main page: fixed column width jumping on initial render
- Settings page: fix empty SSR render
- About page: show short commit SHA
- Password page: disable form in demo mode
- Main page: fixed column width jumping on initial render
- Settings page: fix empty SSR render

## [0.1.1] - 2022-05-14

### Fixed

- Release pipelines
- Release pipelines

## [0.1.0] - 2022-05-14

### Added

- The entire app!

[unreleased]: https://github.com/frysztak/orpington-news/compare/0.4.0...HEAD
[Unreleased]: https://github.com/frysztak/orpington-news/compare/0.4.2...HEAD

[0.4.2]: https://github.com/frysztak/orpington-news/compare/0.4.1...0.4.2

[0.4.1]: https://github.com/frysztak/orpington-news/compare/0.4.0...0.4.1

[0.4.0]: https://github.com/frysztak/orpington-news/compare/0.3.0...0.4.0

[0.3.0]: https://github.com/frysztak/orpington-news/compare/0.2.0...0.3.0

[0.2.0]: https://github.com/frysztak/orpington-news/compare/0.1.1...0.2.0

[0.1.1]: https://github.com/frysztak/orpington-news/compare/0.1.0...0.1.1

[0.1.0]: https://github.com/frysztak/orpington-news/compare/3a8ce08cb5a8d1f4b2b75de39ad2d1f79aaab9a6...0.1.0
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Orpington News

<img alt="GitHub release (latest SemVer)" src="https://img.shields.io/github/v/release/frysztak/orpington-news">
<img alt="Docker image size" src="https://ghcr-badge.herokuapp.com/frysztak/orpington-news/size">
<img alt="License" src="https://img.shields.io/github/license/frysztak/orpington-news">
[![release](https://img.shields.io/github/v/release/frysztak/orpington-news)](https://github.com/frysztak/orpington-news/releases)
[![image-size](https://ghcr-badge.herokuapp.com/frysztak/orpington-news/size)](https://github.com/frysztak/orpington-news/pkgs/container/orpington-news)
[![license](https://img.shields.io/github/license/frysztak/orpington-news)](https://github.com/frysztak/orpington-news/blob/master/LICENSE)

<img alt="CI/CD DEV" src="https://github.com/frysztak/orpington-news/actions/workflows/dev.yml/badge.svg">
<img alt="CI/CD Master" src="https://github.com/frysztak/orpington-news/actions/workflows/main.yml/badge.svg">
[![cicd-dev](https://github.com/frysztak/orpington-news/actions/workflows/dev.yml/badge.svg)](https://github.com/frysztak/orpington-news/actions/workflows/dev.yml)
[![cicd-master](https://github.com/frysztak/orpington-news/actions/workflows/main.yml/badge.svg)](https://github.com/frysztak/orpington-news/actions/workflows/main.yml)

Orpington News is a self-hosted RSS/Atom feed reader with PWA support.

Expand Down Expand Up @@ -33,7 +33,7 @@ Docker image (`ghcr.io/frysztak/orpington-news`) exposes the app on port `8000`.
- `APP_URL`
- `DB_HOST`
- `DB_PASS`
- `COOKIE_SECRET` - at least 32 characters long random string. You can use `openssl rand -base64 32` to generate it
- `COOKIE_SECRET` - at least 32 characters long random string. If not set will use a fallback value. You can use `openssl rand -base64 32` to generate it.

For `DB_PASS` and `COOKIE_SECRET`, `_FILE` suffix is also supported. For example, `DB_PASS_FILE=./secrets/db_pass` will read database
password from file `secrets/db_pass`. All variables are described in [Wiki page](https://github.com/frysztak/orpington-news/wiki/Env-variables).
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"devDependencies": {
"cross-env": "^7.0.3",
"husky": "^8.0.1",
"lerna": "^5.1.1",
"lint-staged": "^13.0.1",
"prettier": "^2.6.2",
"lerna": "^5.1.4",
"lint-staged": "^13.0.2",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"typescript": "^4.7.3",
"yarn-audit-fix": "^9.3.1"
Expand All @@ -27,5 +27,5 @@
"*.{js,cjs,css,md,ts,tsx,json,yml,yaml}": "prettier --write"
},
"packageManager": "[email protected]",
"version": "0.4.1"
"version": "0.4.2"
}
14 changes: 7 additions & 7 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"pino-pretty": "^8.0.0"
},
"devDependencies": {
"@babel/core": "^7.18.2",
"@babel/core": "^7.18.5",
"@babel/plugin-transform-modules-commonjs": "^7.18.2",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
Expand All @@ -40,8 +40,8 @@
"@sinclair/typebox": "^0.23.5",
"@slonik/migrator": "^0.11.2",
"@types/connect-pg-simple": "^7.0.0",
"@types/jest": "^28.1.1",
"@types/node": "^17.0.42",
"@types/jest": "^28.1.2",
"@types/node": "^17.0.45",
"@types/proper-url-join": "^2.1.1",
"ajv": "^8.11.0",
"ajv-formats": "^2.1.1",
Expand All @@ -53,17 +53,17 @@
"data-uri-to-buffer": "^4.0.0",
"date-fns": "^2.28.0",
"dotenv": "^16.0.1",
"esbuild": "^0.14.43",
"esbuild": "^0.14.45",
"eslint-plugin-sql": "^2.1.0",
"event-iterator": "^2.0.0",
"fastify": "^4.0.1",
"fastify": "^4.0.3",
"fastify-sse-v2": "^2.2.1",
"file-type": "^17.1.2",
"html-entities": "^2.3.3",
"is-relative-url": "^4.0.0",
"isomorphic-dompurify": "^0.19.0",
"jest": "^28.1.1",
"nock": "^13.2.6",
"nock": "^13.2.7",
"node-fetch": "^3.2.6",
"node-html-parser": "^5.3.3",
"normalize-url": "7.0.3",
Expand All @@ -77,7 +77,7 @@
"striptags": "^3.2.0",
"toad-scheduler": "^1.6.1",
"truncate-html": "^1.0.4",
"ts-jest": "^28.0.4",
"ts-jest": "^28.0.5",
"typescript": "^4.7.3"
},
"installConfig": {
Expand Down
11 changes: 10 additions & 1 deletion packages/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ const fastify = Fastify({

const PostgresStore = connectPgSimple(fastifySession as any);

const getCookieSecret = (): string => {
try {
return readEnvVariable('COOKIE_SECRET', { fileFallback: true });
} catch (err) {
logger.warn('COOKIE_SECRET not found, using default value.');
return 'C9+YT8xJAaz5lppSeC/s/gZ2bitWCLRTUg8SOCYQe4k=';
}
};

async function setupFastify() {
await fastify.register(fastifySwagger, {
routePrefix: '/openapi',
Expand Down Expand Up @@ -63,7 +72,7 @@ async function setupFastify() {

await fastify.register(fastifyCookie);
await fastify.register(fastifySession, {
secret: readEnvVariable('COOKIE_SECRET', { fileFallback: true }),
secret: getCookieSecret(),
cookie: {
httpOnly: true,
secure: process.env.NODE_ENV !== 'development',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export const CollectionIconField: React.FC<CollectionIconFieldProps> = (
overflowY="auto"
overflowX="hidden"
onIconSelected={handleSelect}
value={value}
/>
</PopoverContent>
</Popover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const CardItem = forwardRef((props: CardItemProps, ref) => {
justifyContent="space-between"
borderRadius="md"
border="1px"
borderColor={useColorModeValue('gray.300', 'gray.700')}
borderColor={useColorModeValue('purple.50', 'gray.700')}
>
<HStack w="full" justifyContent="space-between" alignItems="flex-start">
<NextLink
Expand Down Expand Up @@ -69,12 +69,12 @@ export const CardItem = forwardRef((props: CardItemProps, ref) => {
<Box
p={3}
w="full"
background={useColorModeValue('gray.300', 'gray.700')}
background={useColorModeValue('purple.50', 'gray.700')}
>
<Text noOfLines={[2, 3]} overflowWrap="anywhere">
{summary}
</Text>
<Text color="gray.500">
<Text color={useColorModeValue('gray.600', 'gray.400')}>
by {collection.title}
{readingTimeRounded > 0 && ` • about ${readingTimeRounded} min`}
</Text>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/components/panes/Panes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const Panes: React.FC<PanesProps & BoxProps> = (props) => {
</HStack>
</Resizable>

{mainContent ?? <EmptyMain />}
{mainContent || <EmptyMain />}
</HStack>

{/* Mobile view */}
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/components/panes/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './Panes';
export * from './EmptyMain';
Loading

0 comments on commit 6e45cc3

Please sign in to comment.