WIP: Add QR code type "WiFi", changed frontend to reflect changes #27

Draft
denisebitca wants to merge 4 commits from denisebitca/libreqr:wifi_as_qr_code_type_pr into main
Contributor

QR codes types can now be chosen between text mode and WiFi mode.
In the backend, nothing major changes: this is frontend sugar for
creating a QR code of the WiFi MECARD-like scheme*, with some extra
backend validation + escaping to make sure the QR code is well
formatted and can be used. This scheme is particularly hard to
explain to endusers and isn't as easy to use as a URI scheme like
mailto or geo.

QR codes types can now be chosen between text mode and WiFi mode. In the backend, nothing major changes: this is frontend sugar for creating a QR code of the WiFi MECARD-like scheme*, with some extra backend validation + escaping to make sure the QR code is well formatted and can be used. This scheme is particularly hard to explain to endusers and isn't as easy to use as a URI scheme like mailto or geo. * Please check https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11 for more information about the WiFi MECARD-like scheme.
denisebitca added 1 commit 2025-04-11 16:52:24 +02:00
QR codes types can now be chosen between text mode and WiFi mode.
In the backend, nothing major changes: this is frontend sugar for
creating a QR code of the WiFi MECARD-like scheme*, with some extra
backend validation + escaping to make sure the QR code is well
formatted and can be used. This scheme is particularly hard to
explain to endusers and isn't as easy to use as a URI scheme like
mailto or geo.

* Please check https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11
for more information about the WiFi MECARD-like scheme.
Author
Contributor

Frontend pictures

image

image

# Frontend pictures ![image](/attachments/36877de1-8b93-4b4c-b82d-1acc38c03891) ![image](/attachments/7c27c9c8-7387-4843-bfc9-fd084f085bd1)
Author
Contributor

Ideas for requirements on this PR:

  • French and English locales
  • More verbose error pages
  • HTML and CSS review
Ideas for requirements on this PR: - [ ] French and English locales - [ ] More verbose error pages - [ ] HTML and CSS review
miraty added 1 commit 2025-04-13 14:29:08 +02:00
The WiFi option is now a preconfiguration for the main textarea using a dedicated form.

Hidden inputs are introduced to maintain state between the 2 forms.

$params is removed to simplify the program flow by using $_POST directly.
Owner

As we discussed off-the-record, the wifi configuration now also writes its output to the main textarea, to make the process more transparent to users.

As we discussed off-the-record, the wifi configuration now also writes its output to the main textarea, to make the process more transparent to users.
Owner

The encryption settings can be simplified by not explicitly asking the user for the encryption method and default to none if the password field is empty and to WPA* otherwise.

Doing so would help with:

  • error handling: no encryption method selected without password cases anymore
  • UX: most people don't know the encryption method they use and that's almost always WPA*
  • CSS: no need to hide the password field when unencrypted

We may add a checkbox after the password field to change WPA* to WEP, although that's very rare nowadays.

The encryption settings can be simplified by not explicitly asking the user for the encryption method and default to none if the password field is empty and to WPA* otherwise. Doing so would help with: - error handling: no encryption method selected without password cases anymore - UX: most people don't know the encryption method they use and that's almost always WPA* - CSS: no need to hide the password field when unencrypted We may add a checkbox after the password field to change WPA* to WEP, although that's very rare nowadays.
miraty added 1 commit 2025-05-03 15:49:07 +02:00
This helps a lot for error handling and UX.

WEP is now unsupported.
miraty added 1 commit 2025-05-06 23:32:16 +02:00
Because wifi SSIDs and passwords can't be multiline
Owner

I did some usability testing on other people and found out that having 2 forms on the same page as I did in eef15b5fe2 is very confusing.

Instead, I'll try to make another page dedicated to the wifi workflow, with a tab-like navbar to switch between wifi and plaintext pages. This will require way more changes in the code, but I feel like it's actually required to limit users confusion.

I did some usability testing on other people and found out that having 2 forms on the same page as I did in eef15b5fe2 is very confusing. Instead, I'll try to make another page dedicated to the wifi workflow, with a tab-like navbar to switch between wifi and plaintext pages. This will require way more changes in the code, but I feel like it's actually required to limit users confusion.
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u wifi_as_qr_code_type_pr:denisebitca-wifi_as_qr_code_type_pr
git checkout denisebitca-wifi_as_qr_code_type_pr

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff denisebitca-wifi_as_qr_code_type_pr
git checkout denisebitca-wifi_as_qr_code_type_pr
git rebase main
git checkout main
git merge --ff-only denisebitca-wifi_as_qr_code_type_pr
git checkout denisebitca-wifi_as_qr_code_type_pr
git rebase main
git checkout main
git merge --no-ff denisebitca-wifi_as_qr_code_type_pr
git checkout main
git merge --squash denisebitca-wifi_as_qr_code_type_pr
git checkout main
git merge --ff-only denisebitca-wifi_as_qr_code_type_pr
git checkout main
git merge denisebitca-wifi_as_qr_code_type_pr
git push origin main
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: miraty/libreqr#27
No description provided.