Skip to content

Commit 7b892eb

Browse files
committed
Merge branch 'improve-browser-extension'
2 parents dba7f87 + e4907d3 commit 7b892eb

File tree

119 files changed

+1401
-547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1401
-547
lines changed

.pre-commit-config.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ repos:
5151
- --allow-past-years
5252

5353
- repo: https://github.com/adamchainz/django-upgrade
54-
rev: "1.23.1"
54+
rev: "1.24.0"
5555
hooks:
5656
- id: django-upgrade
5757
args: ["--target-version", "5.0"]
@@ -64,15 +64,15 @@ repos:
6464

6565
- repo: https://github.com/astral-sh/ruff-pre-commit
6666
# Ruff version.
67-
rev: v0.11.2
67+
rev: v0.11.5
6868
hooks:
6969
- id: ruff
7070
args: [--fix, --preview]
7171
- id: ruff-format
7272
args: [--preview]
7373

7474
- repo: https://github.com/seddonym/import-linter
75-
rev: v2.2
75+
rev: v2.3
7676
hooks:
7777
- id: import-linter
7878

@@ -91,7 +91,7 @@ repos:
9191
args: [-e, SC1091]
9292

9393
- repo: https://github.com/thibaudcolas/pre-commit-stylelint
94-
rev: v16.15.0
94+
rev: v16.18.0
9595
hooks:
9696
- id: stylelint
9797
args: [--fix]
@@ -100,7 +100,7 @@ repos:
100100
101101

102102
- repo: https://github.com/pre-commit/mirrors-eslint
103-
rev: "v9.22.0"
103+
rev: "v9.24.0"
104104
hooks:
105105
- id: eslint
106106
args: [--fix]

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22

33
## Unreleased
44

5+
## 25.04.2
6+
57
- Show reading list title and reading list actions when scrolling up.
8+
- Improve browser extension:
9+
- Display site title instead of nothing for feed links without a title attribute.
10+
- Can go back to list of actions from error, article & feed.
11+
- Can delete article from extension.
12+
- Display on actions chooser whether the sure is subscribed feeds.
13+
- Display on actions chooser whether the article is already saved.
14+
- Can delete and disable/enable a feed from the extension.
15+
- API changes:
16+
- Switch from `link` to `url` to save articles. This is done to have a consistant naming in the codebase.
17+
- Can list articles and filter them by URLs.
18+
- Can list feeds and filter them by feed URLs and enabled status.
19+
- Correct Django admin styling.
20+
- This was caused by the update to `django-csp` 4.0 which changed how CSP rules are computed. It caused the admin to be unable to load its script files and stylesheets.
21+
- Allow base64 encoded images.
22+
- Keep h1 titles when we have more than 1.
23+
- Some invalid articles may have multiple h1, keep them in this case since they are "normal" article titles and thus must be kept.
624

725
## 25.04.1
826

browser-extension/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "legadilo-browser-extension",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"dependencies": {
55
"bootstrap": "^5.3.3",
66
"bootstrap5-tags": "^1.7.5",

browser-extension/src/action.html

+64-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,25 @@
2020
<div id="choose-action-container" class="row row-cols-1 m-auto">
2121
<button id="save-article-action-btn"
2222
class="btn btn-primary mb-2 col"
23-
type="button">Save this article</button>
23+
type="button">
24+
Save this article
25+
<img id="article-already-saved"
26+
class="bi hidden"
27+
src="./vendor/bs-icons/save-fill.svg"
28+
alt="Article already saved" />
29+
</button>
2430
</div>
31+
<div id="subscribe-to-feeds-container" class="row row-cols-1 m-auto"></div>
2532
</div>
2633
<div id="article-container">
34+
<button id="article-nav-back"
35+
class="btn btn-outline-secondary btn-sm"
36+
type="button">
37+
<img class="bi"
38+
src="./vendor/bs-icons/arrow-left.svg"
39+
alt="Go back button" />
40+
Back
41+
</button>
2742
<form id="update-saved-article-form">
2843
<div class="mb-3">
2944
<label for="saved-article-title" class="form-label">
@@ -56,7 +71,9 @@
5671
</select>
5772
</div>
5873
<div class="mb-3 d-flex justify-content-center">
59-
<button class="btn btn-primary btn-sm" type="submit">Update</button>
74+
<button id="update-saved-article"
75+
class="btn btn-primary btn-sm"
76+
type="submit">Update</button>
6077
</div>
6178
</form>
6279
<div class="mb-3 d-flex justify-content-evenly">
@@ -96,6 +113,11 @@
96113
src="./vendor/bs-icons/bookmark-fill.svg"
97114
alt="Unmark as for later" />
98115
</button>
116+
<button class="btn btn-outline-danger btn-sm"
117+
type="button"
118+
id="delete-article">
119+
<img class="bi" src="./vendor/bs-icons/trash.svg" alt="Delete article" />
120+
</button>
99121
<a id="open-article-details"
100122
class="btn btn-outline-secondary btn-sm"
101123
role="button"
@@ -105,6 +127,14 @@
105127
</div>
106128
</div>
107129
<div id="feed-container">
130+
<button id="feed-nav-back"
131+
class="btn btn-outline-secondary btn-sm"
132+
type="button">
133+
<img class="bi"
134+
src="./vendor/bs-icons/arrow-left.svg"
135+
alt="Go back button" />
136+
Back
137+
</button>
108138
<h2 id="feed-title"></h2>
109139
<form id="update-feed-form">
110140
<div class="mb-3">
@@ -148,19 +178,49 @@ <h2 id="feed-title"></h2>
148178
<option disabled hidden value="">Choose a tag...</option>
149179
</select>
150180
</div>
151-
<button class="btn btn-primary btn-sm">Update</button>
181+
<div class="mb-3 d-flex justify-content-center">
182+
<button id="update-feed" class="btn btn-primary btn-sm" type="submit">Update</button>
183+
</div>
184+
</form>
185+
<div class="mb-3 d-flex justify-content-evenly">
186+
<button id="enable-feed"
187+
class="btn btn-outline-secondary btn-sm"
188+
type="button">Enable</button>
189+
<button id="disable-feed"
190+
class="btn btn-outline-secondary btn-sm"
191+
type="button">Disable</button>
192+
<button class="btn btn-outline-danger btn-sm" type="button" id="delete-feed">
193+
<img class="bi" src="./vendor/bs-icons/trash.svg" alt="Delete feed" />
194+
</button>
152195
<a id="open-feed-details"
153196
class="btn btn-outline-secondary btn-sm"
154197
role="button"
155198
href="">
156199
<img class="bi" src="./vendor/bs-icons/eye.svg" alt="Open feed" />
157200
</a>
158-
</form>
201+
</div>
159202
</div>
160203
<div id="error-container" class="alert alert-danger">
204+
<button id="error-nav-back"
205+
class="btn btn-outline-secondary btn-sm"
206+
type="button">
207+
<img class="bi"
208+
src="./vendor/bs-icons/arrow-left.svg"
209+
alt="Go back button" />
210+
Back
211+
</button>
161212
<p>An error occurred</p>
162213
<pre id="error-message"></pre>
163214
</div>
215+
<dialog id="confirm-dialog">
216+
<div class="modal-header">
217+
<h2 id="confirm-dialog-title" class="modal-title">Do you confirm?</h2>
218+
</div>
219+
<button id="confirm-dialog-cancel-btn"
220+
class="btn btn-outline-secondary"
221+
type="button">No</button>
222+
<button id="confirm-dialog-confirm-btn" class="btn btn-danger" type="button">Yes</button>
223+
</dialog>
164224
<script src="action.js" type="module"></script>
165225
</body>
166226
</html>

0 commit comments

Comments
 (0)