Skip to content

feat(swa): move feed compose into a modal opened by a fixed button#71

Merged
github-actions[bot] merged 1 commit into
devfrom
feature/post-modal
Jun 19, 2026
Merged

feat(swa): move feed compose into a modal opened by a fixed button#71
github-actions[bot] merged 1 commit into
devfrom
feature/post-modal

Conversation

@Ryback2501

Copy link
Copy Markdown
Owner

Summary

  • Turn the Feeds compose area into a modal opened by a floating "Post" button fixed to the bottom-right of the feed, so it stays reachable regardless of feed scroll and no longer occupies a permanent panel above the feed.

Changes

Feed client (swa/)

  • index.html — move the compose markup (subject, textarea, char counter, Post button, PoW selector, result) out of the always-present #post-panel into a new #post-modal reusing the existing modal pattern; add a fixed #open-post-btn trigger inside the Feeds section.
  • app.js — wire the trigger to open the modal (focus the textarea); close on the close button, backdrop click, and Escape; close the modal after a successful post (errors keep it open).
  • style.css.post-fab fixed bottom-right pill button and a .post-modal-card width.

Test plan

  • Log in, open Feeds — a floating Post button sits at the bottom-right; scrolling the feed keeps it visible.
  • Click it — the modal opens with subject, textarea, char counter, PoW selector, and Post button, identical to the previous panel.
  • Submit a note — it publishes, appears in the feed, and the modal closes; reopening shows cleared fields.
  • Submit with no relay/keys — the error shows and the modal stays open.
  • Switch to User/Relays/Chats — the floating button is hidden; return to Feeds — it reappears. Escape and backdrop click close the modal.

@github-actions github-actions Bot merged commit 4e170fd into dev Jun 19, 2026
10 checks passed
@github-actions github-actions Bot deleted the feature/post-modal branch June 19, 2026 11:56
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.

1 participant