Commit graph

1663 commits

Author SHA1 Message Date
jvoisin
0adac5c6f7 Minor code simplification in internal/ui/view/view.go
No need to create the map item by item when we
can create it in one go.
2024-02-25 17:31:44 -08:00
jvoisin
54b5be5e7d Significantly simplify/speed up the sanitizer
- Use constant time access for maps instead of iterating on them
- Build a ~large whitelist map inline instead of constructing it item by item
  (and remove a duplicate key/value pair)
- Use `slices` instead of hand-rolled loops
2024-02-25 17:29:46 -08:00
Frédéric Guillot
eae4cb1417 Add feed option to disable HTTP/2 to avoid fingerprinting 2024-02-24 22:30:26 -08:00
Frédéric Guillot
420a3d4d95 Remove Golint
- Golint is deprecated
- Use staticcheck and golangci-lint instead
2024-02-24 21:17:56 -08:00
jvoisin
b48ad6dbfb Make use of go≥1.21 slices package instead of hand-rolled loops
This makes the code a tad smaller, moderner,
and maybe even marginally faster, yay!
2024-02-24 20:22:53 -08:00
jvoisin
2be5051b19 Reorder the fields of the Entry struct to save some memory
Given that there is always a ton of `Entry` floating around, reordering its
field to take less space is a quick/simple way to reduce miniflux' memory
consumption.

I kept the `ID` field as the first member, as I think it's the most important
one, and moving it somewhere else would drown it in other fields.

Anyway, this still provides a reduction of 32 bytes per Entry:

```console
$ fieldalignment  ./client/model.go 2>&1 | grep 203
~/v2/client/model.go:203:12: struct with 280 pointer bytes could be 240
$ fieldalignment  ./client/model.go 2>&1 | grep 203
~/v2/client/model.go:203:12: struct with 248 pointer bytes could be 240
$
```

The same optimisation pass could be applied to other structs, but since they
aren't present in obviously great numbers during miniflux' life cycle, it would
likely require some profiling to see if it's worth doing it.
2024-02-24 20:08:27 -08:00
jvoisin
c544dadd55 Fix categories import from Thunderbird's OPML
Thunderbird OPML exports are looking like this:

```xml
<opml version="1.0" xmlns:fz="urn:forumzilla:">
<head>
	<title>Thunderbird OPML Export - RSS</title>
    	<dateCreated>Sat, 24 Feb 2024 11:31:13 GMT</dateCreated>
</head>
<body>
	<outline title="News">
		<outline type="rss" ...>
		<outline type="rss" ...>
		...
	</outline>
	<outline title="Blogs">
		<outline type="rss" ...>
		<outline type="rss" ...>
		...
	</outline>
</body>
```

This commit make it so that categories are now correctly imported.
2024-02-24 19:43:33 -08:00
Frédéric Guillot
1da65d97d8 Proxify video poster attribute 2024-02-23 18:44:20 -08:00
Frédéric Guillot
c595c80356 Handle RDF feeds with duplicated <title> elements 2024-02-23 17:40:58 -08:00
dependabot[bot]
20e5fbcd7a Bump github.com/PuerkitoBio/goquery from 1.8.1 to 1.9.0
Bumps [github.com/PuerkitoBio/goquery](https://github.com/PuerkitoBio/goquery) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/PuerkitoBio/goquery/releases)
- [Commits](https://github.com/PuerkitoBio/goquery/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/PuerkitoBio/goquery
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 16:32:21 -08:00
dependabot[bot]
ac77154907 Bump github.com/tdewolff/minify/v2 from 2.20.17 to 2.20.18
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.17 to 2.20.18.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.17...v2.20.18)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 16:32:01 -08:00
Thomas J Faughnan Jr
97ace53bc9 Makefile: quiet git describe and rev-parse stderr 2024-02-21 22:08:02 -08:00
Frédéric Guillot
feb962f98a Build amd64/arm64 Debian packages with CGO disabled
That should ensure that the binary is compiled statically
2024-02-21 21:23:48 -08:00
Frédéric Guillot
8602089a1e Adjust GitHub Actions condition for manual pipeline execution 2024-02-21 21:19:07 -08:00
Frédéric Guillot
4b0648f3d7 Update go.mod and add .exe suffix to Windows binary 2024-02-21 21:16:43 -08:00
Frédéric Guillot
856b96cbf8 Add job to build packages on-demand 2024-02-21 21:11:00 -08:00
Robert Lützner
facf38955c Add 'Enter' key as a hotkey to open selected item
There are a few things that need to be done, to make this work.

First, we need to register `Enter` as another hotkey that opens the
selected item.

However, by default the `KeyboardHandler` will override all default
actions. That might make sense for any other key, but for the `Enter`
key, we want to keep the default behavior (i.e. follow a selected link
or press a button). So for this single key event, we do not call
`preventDefault()`.

I see this as unproblematic for the following reasons.

1. With the changes from #2348, when we're in a list of items (articles,
   categories, feeds), there is no link selected. This is what made the
   `Enter` key work _implicitly_ in the past. With nothing selected, the
   `Enter` key will do nothing by default.
2. If we have **any** link selected (including when we are in a view
   with a list of selectable items), we'll get the default action of
   `Enter` (i.e. follow a link), which is exactly what we had before.

Lastly, we need to update the list of keyboard shortcuts displayed when
pressing `?`.

This fixes #2366.
2024-02-21 20:02:58 -08:00
MSTCL
cfdb890eae
Add Readeck integration 2024-02-21 19:57:34 -08:00
Thomas J Faughnan Jr
2f8d3a7958 Makefile: do not force CGO_ENABLED=0 for miniflux target 2024-02-21 19:47:58 -08:00
Frédéric Guillot
59311deb57 Fix logo misalignment when using languages that are more verbose than English 2024-02-19 15:10:35 -08:00
dependabot[bot]
d2541a173a Bump github.com/tdewolff/minify/v2 from 2.20.16 to 2.20.17
Bumps [github.com/tdewolff/minify/v2](https://github.com/tdewolff/minify) from 2.20.16 to 2.20.17.
- [Release notes](https://github.com/tdewolff/minify/releases)
- [Commits](https://github.com/tdewolff/minify/compare/v2.20.16...v2.20.17)

---
updated-dependencies:
- dependency-name: github.com/tdewolff/minify/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-19 14:58:10 -08:00
Frédéric Guillot
b618c11b80 Fix typo in man page and Changelog 2024-02-17 13:28:17 -08:00
Frédéric Guillot
8b4675807a Update ChangeLog 2024-02-17 12:07:36 -08:00
Frédéric Guillot
c0bca973d6 Update GitHub Actions to Go 1.12 2024-02-17 12:00:23 -08:00
krvpb024
5c97771e61 fix macOS VoiceOver didn't announce details and summary expand 2024-02-14 20:11:23 -08:00
dependabot[bot]
c9cbe8afd5 Bump golangci/golangci-lint-action from 3 to 4
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 19:30:13 -08:00
knrdl
1d90ce9dd2
Add Linkwarden integration 2024-02-11 17:12:37 -08:00
knrdl
ccb9eed573 fix wrong label on save
when saving an entry the label was reset on complete
so the desired done label was never shown
2024-02-11 12:49:08 -08:00
krvpb024
2221fd408d fix the page-button hover style not show 2024-02-09 19:37:10 -08:00
Tân Î-sîn
ea58bac548
Replace link has button role with button tag
# Change HTML tag to button

Replace the link tag with an HTML button to prevent some screen readers from having confusing announcements. By using the HTML button, users can use the Enter and Space keys to activate actions by default, instead of implementing them in JavaScript.

# Differentiate links and buttons visually

When activating the link element, the user may expect the web page to navigate to the URL and the page will refresh; when activating the button element, the user may expect the web page to still be on the same page, so that their current state, such as: input value, won't disappear.

Links and buttons should have different styles visually, so that users can't expect what will happen when they activate a link or a button.

I added the underline to the links, because that is the common pattern. Buttons have border and background color in a common pattern. But I think that will change the current layout drastically. So I added the focus, hover and active classes to the buttons instead.
2024-02-09 17:09:30 -08:00
krvpb024
0f85c0511a remove item focus outline overlapped on current style 2024-02-09 16:54:29 -08:00
krvpb024
27749a2877 change focus target on items when using keyboard navigation 2024-02-09 16:54:29 -08:00
dependabot[bot]
0991c27f9d Bump golang.org/x/oauth2 from 0.16.0 to 0.17.0
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 19:56:08 -08:00
dependabot[bot]
00eab03655 Bump golang.org/x/net from 0.20.0 to 0.21.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.20.0 to 0.21.0.
- [Commits](https://github.com/golang/net/compare/v0.20.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 19:26:55 -08:00
dependabot[bot]
e55377b204 Bump github.com/go-webauthn/webauthn from 0.10.0 to 0.10.1
Bumps [github.com/go-webauthn/webauthn](https://github.com/go-webauthn/webauthn) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/go-webauthn/webauthn/releases)
- [Commits](https://github.com/go-webauthn/webauthn/compare/v0.10.0...v0.10.1)

---
updated-dependencies:
- dependency-name: github.com/go-webauthn/webauthn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 19:04:41 -08:00
dependabot[bot]
4ddc4ec002 Bump golang.org/x/crypto from 0.18.0 to 0.19.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.19.0.
- [Commits](https://github.com/golang/crypto/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-08 18:52:52 -08:00
krvpb024
facf17db3f remove icon img alt text 2024-02-07 21:59:09 -08:00
dependabot[bot]
8663c7d031 Bump golang.org/x/term from 0.16.0 to 0.17.0
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/term/compare/v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-07 21:58:05 -08:00
krvpb024
6eac968083 add keyboard shortcut and aria attribute to menu button 2024-02-07 21:56:24 -08:00
Frédéric Guillot
bd573957e0 Debian packages are failing to build
Error seen on GitHub Actions:

```
-buildmode=pie requires external (cgo) linking, but cgo is not enabled
```
2024-02-07 21:35:06 -08:00
Frédéric Guillot
5ce5c47499 Remove translation key page.categories.unread_counter 2024-02-05 21:39:02 -08:00
Frédéric Guillot
9336891e67 Restore menu toggle when clicking on the logo
The caret icon is too small on smartphone to expand/collapse the menu
2024-02-05 21:18:06 -08:00
Frédéric Guillot
aa30c35e7e Use numeric UID in Alpine Docker image
Same as PR #2332
2024-02-05 20:49:25 -08:00
krvpb024
39368ece9a add alert role to alert message element 2024-02-05 20:14:23 -08:00
krvpb024
4f57309380 remove button role on element which perform navigation 2024-02-05 20:10:38 -08:00
krvpb024
57e7bd5bc9 add button role to links with action 2024-02-05 20:10:38 -08:00
krvpb024
bf54222be7 hide menu button in desktop layout instead of icon 2024-02-04 21:36:31 -08:00
Sheogorath
552fb3e4cc Fix non-numeric UID
This patch adjusts the distroless image to use the predefined non-root UID, which uses explicit UID definitions. This allows orchestrators like Kubernetes to validate non-zero UIDs directly by checking the Image metadata.

The previous setup without an explicit `runAsUser` in the securityContext would produce the following error when enabling `runAsNonRoot`:

```
Error: container has runAsNonRoot and image has non-numeric user (nonroot), cannot verify user is non-root (pod: "miniflux-97cc5955f-pt7vf_miniflux(d1c56d29-ea0a-407c-b3f3-9821fbd7ee61)", container: miniflux)
```
2024-02-04 21:32:42 -08:00
Frédéric Guillot
7d9f174b3f Add missing label ID for custom CSS field 2024-02-04 13:41:23 -08:00
Frédéric Guillot
bf4d31eebe Add styling to search button 2024-02-04 13:36:31 -08:00