Skip to content

Update comment rules session register : Labels de modales harmonisés, espacement hint corrigé, hint email ajouté - #54

Merged
raynaldlao merged 9 commits into
masterfrom
update-comment-rules-session-register
Jul 25, 2026
Merged

Update comment rules session register : Labels de modales harmonisés, espacement hint corrigé, hint email ajouté#54
raynaldlao merged 9 commits into
masterfrom
update-comment-rules-session-register

Conversation

@raynaldlao

@raynaldlao raynaldlao commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Contexte

  • Les labels dans les modales (Email, New Password, Reason…) utilisaient la police --font-mono (JetBrains Mono) alors que le reste du site utilise --font-primary (Inter). Incohérence visuelle.
  • Le gap: var(--spacing-sm) sur .modal-input-group créait un double espacement entre le .field-hint et l'input : 0.5 rem de gap flex + les marges internes du hint. Le hint semblait trop éloigné de son input.
  • La modale "Changer l'email" dans profile.html n'avait aucun .field-hint, contrairement aux autres champs (password, ban reason).

Changements

Police des labels (3 fichiers CSS)

  • profile.css — retrait de font-family: var(--font-mono) sur .modal-input-group label
  • user-list.css — retrait de font-family: var(--font-mono) sur .dialog .modal-input-group label
  • article.css — retrait de font-family: var(--font-mono) sur .modal-input-group label
  • Les labels héritent désormais du label { font-family: var(--font-primary) } global dans base.css

Espacement hint → input (4 fichiers CSS)

  • profile.css.modal-input-group : gap passe de var(--spacing-sm) à 0
  • user-list.css.dialog .modal-input-group : gap passe de var(--spacing-sm) à 0
  • article.css.modal-input-group : gap passe de var(--spacing-sm) à 0
  • base.css — ajout de margin-bottom: 0.125rem sur .field-hint
  • Note : le pattern gap: 0 existait déjà pour #ban-modal .modal-input-group, désormais généralisé

Hint manquant (1 template)

  • profile.html — ajout de <span class="field-hint">Ex. : user@example.com</span> dans la modale email

…bove the comment form. The article template now shows five French rules covering links, profanity, duplicates, respectful tone and ban conditions. New `.comment-rules` styles added in `article.css`, using the existing design tokens for surface, radius and spacing so the block fits naturally with the rest of the UI
…ened. Username gets a 3–30‑character pattern, passwords require 8+ characters with strength checks, login minimum raised, templates updated with field hints, comment rules moved to English, hint CSS unified, French translations added, tests expanded and migration V18 introduces `session_token` plus a 30‑character username column
…ed. Each account now has a `session_token`, login issues a new random token stored in DB and cookie, and `get_account()` rejects mismatches. The adapter clears sessions and flashes an error for non‑API paths, while API calls return 401 and React redirects to `/`. Token is cleared on logout and ban. English/French translations added. Four new test classes cover adapter, service, integration and in‑memory behavior
… extra flex gap in `.modal-input-group` is removed across article, profile and user‑list styles, and `.field-hint` now gets a small bottom margin for proper visual separation
… modal input labels now use the primary font by removing the `--font-mono` override from article, profile and user‑list styles
@raynaldlao
raynaldlao requested a review from hlargitte July 25, 2026 19:30
@raynaldlao raynaldlao self-assigned this Jul 25, 2026
…removed. All 27 `__init__.py` files were unused and dropped to adopt implicit namespace packages and improve pytest discovery
…All sub‑8‑character test passwords were replaced with `Str0ng!Pass` to satisfy the new minimum length, and long constructor lines were split to stay under ruff’s 130‑character limit across the affected test files
…d. Logout now returns 403 when no active session and hard‑delete requires admin, matching other admin‑only endpoints. The session adapter short‑circuits before service calls, tests updated for both logout and hard‑delete paths
…All Flask adapters now follow standard third‑party alphabetical order: `from flask import …` is placed before `flask_babel`, and the `g as global_request_context` import is merged into the sorted block across the four adapter files
@raynaldlao raynaldlao changed the title Update comment rules session register : Harmonisation police modales + espacement field-hint Update comment rules session register : Labels de modales harmonisés, espacement hint corrigé, hint email ajouté Jul 25, 2026

@hlargitte hlargitte left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@raynaldlao
raynaldlao merged commit b2783d7 into master Jul 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants