10 Commits

Author SHA1 Message Date
Joseph Nuthalapati
98d4327c49
tiddlywiki: Avoid "412: Precondition failed" error
Apache sends an instruction to the browser to not cache the TiddlyWiki file at
all. This forces the browser to fetch the new version after each write avoiding
the case "file changed on server".

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Drop no-cache and must-revalidate directives as they are redundant]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-07 12:27:35 -07:00
Joseph Nuthalapati
d89fcd74f1
tiddlywiki: Don't allow index.html as a file name
Tests:

- Creating/renaming/uploading wikis with names index[.html] does not work. Doing
so with other names work.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Use validators= property instead of clean_name()]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2025-07-07 11:49:10 -07:00
Sunil Mohan Adapa
89bce7a344
app: Add tags to menu and frontpage components
- Add typing information for init methods Info, Shortcut, and Menu to easily
  identify problems.

- Update docstrings for these components.

- Updates test cases to deal with tags instead of short description.

- Update custom shortcuts code to read tags and ignore short description.

- Update API to send tags instead of custom shortcuts.

- OpenVPN special treatment of info.description in Shortcut

Tests:

- All unit tests pass and type checking succeeds.

- All apps show icons with tags in apps and system section.

- In help section cards don't show tags.

- In front page, enabled apps show shortcuts with tags.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2025-01-09 21:08:10 +05:30
Joseph Nuthalapati
4a620fd1db
tags: Replace short description with tags in app pages
Fixes #2460

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Update the style to provide spacing after tags lines]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-12-29 22:55:35 -08:00
Sunil Mohan Adapa
c5a967a1a2
i18n: Fix translation of FreedomBox name in various places
Tests:

- With a locale that has translation for the 'FreedomBox' source string, check
the following locations have translated string for 'FreedomBox':

  - Default backup repository label.

  - Firewall app description.

  - Network forms for: topology, internet connection type, and router
  configuration.

  - RSS-Bridge app description.

  - TiddlyWiki app description.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-11-07 12:17:34 +02:00
Sunil Mohan Adapa
5fa9bf2928
*: tags: Adjust tags and style
- Don't use title casing, instead use simple capitalization.

- Add some tags.

- Drop outdated tags like 'VoIP', 'IM' while emphasizing 'Audio chat', 'Video
chat', 'Encrypted messaging' instead.

- Try to clarify server vs. web client with tags.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:07:57 -07:00
Joseph Nuthalapati
e5b7ed4faf
*: Implements tags for apps
- Add tags to Info component of apps. Use only English tags for all operations.
Localized tags are used for presentation to the user only. Add tags to all the
apps. Conventions (English):

  1. Tags describing use cases should be in kebab case.

  2. Protocols in tag names should be in their canonical format.

  3. Tags needn't be 100% technically correct. This can get in the way of
  comparing apps using a tag. Words that describe use cases that users can
  easily understand should be preferred over being pedantic.

  4. Tags should be short, ideally not more than 2 words. Avoid conjunctions
  like "and", "or" in tags.

  5. Avoid redundant words like "server", or "web-clients". Most apps on
  FreedomBox are either servers or web clients.

  6. Keep your nouns singular in tags.

- Use query
params to filter the Apps page by tags. When all tags are removed, redirect to /apps.

- Add UI elements to add and remove tag filters in the Apps page. Make the UI
similar to GitLab issue tags. Since there are 40 apps, there will be at least 40
tags. Selecting a tag from a dropdown will be difficult on mobile devices. A
fuzzy search is useful to find tags to add to the filter. Allow user to find the
best match for the search term and highlight it visually. The user can then
press Enter to select the highlighted tag. Make tag search case-insensitive.
Make the dropdown menu scrollable with a fixed size. User input is debounced by
300 ms during search.

- tests: Add missing mock in test_module_loader.py

- Add functional tests

[sunil]

- 'list' can be used instead of 'List' for typing in recent Python versions.

- Reserve tripe-quoted strings for docstrings.

- Undo some changes in module initialization, use module_name for logging
errors.

- isort and yapf changes.

- Encode parameters before adding them to the URL.

Tests:

- Tested the functionality of filtering by tag with one tag and two tags.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:07:54 -07:00
Joseph Nuthalapati
876cace107
tiddlywiki: Avoid writing duplicate temporary files
Tests:

- Raise an error by editing code in create, upload, rename and delete
operations. Notice that the details error messages are shown with a drop-down.

- Upload a wiki and it works. The name is as expected.

- Upload the wiki again notice that the duplicate wiki error is shown.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil: Use new utility for uploading]
[sunil: Better error message display in the UI]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-03 11:45:59 +03:00
Petter Reinholdtsen
79fb6f93db
featherwiki, tiddlywiki: Remove redundant </p> in template
Remove redundant </p> to make translation easier.

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-14 10:26:08 -07:00
Joseph Nuthalapati
96bd9c8bd4
tiddlywiki: Add new app
TiddlyWiki uses almost the same Apache configuration as Feather Wiki,
with one difference - disabling gzip for the `HEAD` request.

The FreedomBox app for TiddlyWiki is identical to Feather Wiki in
every other aspect.

- Proxy download through freedombox.org. This serves two purposes:

1. Upstream's website cannot track the IP addresses of FreedomBox users.
2. We can update the versions of the empty quine files without making
   code changes in FreedomBox.

[sunil]

- Update description to correct the list of users who can access the app.

- Update logo to adhere to the logo guidelines.

- Minor styling fix.

- Update the copyright on the logo based on information from upstream git
repository.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-10 17:57:01 -07:00