From c081de15e8bcaa4aa03049344632e69450272a13 Mon Sep 17 00:00:00 2001 From: saint Date: Sun, 25 Feb 2024 07:05:46 +0000 Subject: [PATCH 1/4] Update README.md Updated to have a link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0994265f..465b8dc0 100644 --- a/README.md +++ b/README.md @@ -15,4 +15,4 @@ To build a federated discussion and link aggregation platform, similar to Reddit - [Screencast: overview of the PieFed codebase](https://join.piefed.social/2024/01/22/an-introduction-to-the-piefed-codebase/) - [Database / entity relationship diagram](https://join.piefed.social/wp-content/uploads/2024/02/PieFed-entity-relationships.png) -- see INSTALL.md +- see [INSTALL.md](INSTALL.md) From ebc960f777fb153f0d17c8726d6b2291f2a1bb18 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 26 Feb 2024 09:50:57 +1300 Subject: [PATCH 2/4] tame aria-labels --- app/templates/list_communities.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/list_communities.html b/app/templates/list_communities.html index bc68d756..65666a8f 100644 --- a/app/templates/list_communities.html +++ b/app/templates/list_communities.html @@ -90,10 +90,10 @@ {% endif %} {% if not low_bandwidth %} - + {% endif %} - {{ community.display_name() }} + {{ community.display_name() }} {{ community.post_count }} {{ community.post_reply_count }} {{ moment(community.last_active).fromNow(refresh=True) }} From a8c79c7405a8493fd3a045aabcefaaeaca0cb2da Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 26 Feb 2024 11:56:49 +1300 Subject: [PATCH 3/4] skip links z-index --- app/static/structure.css | 2 +- app/static/structure.scss | 2 +- entrypoint_celery.sh | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/static/structure.css b/app/static/structure.css index 629b6af8..c215bfe3 100644 --- a/app/static/structure.css +++ b/app/static/structure.css @@ -460,7 +460,7 @@ fieldset legend { left: 0; background-color: #fff; /* Background color to cover the link for screen readers */ - z-index: 999; + z-index: 1030; /* Ensure it's above other content */ } diff --git a/app/static/structure.scss b/app/static/structure.scss index 778896d7..0951d03d 100644 --- a/app/static/structure.scss +++ b/app/static/structure.scss @@ -54,7 +54,7 @@ html { top: -40px; /* Adjust as needed to hide the link off-screen */ left: 0; background-color: #fff; /* Background color to cover the link for screen readers */ - z-index: 999; /* Ensure it's above other content */ + z-index: 1030; /* Ensure it's above other content */ } .skip-link:focus { diff --git a/entrypoint_celery.sh b/entrypoint_celery.sh index 959881be..4e9b2fc0 100644 --- a/entrypoint_celery.sh +++ b/entrypoint_celery.sh @@ -1,3 +1,4 @@ #!/bin/sh -celery -A celery_worker.celery worker +celery -A celery_worker.celery worker --autoscale=5,1 + From 3780a74755459578b5ceb4f8afbf9cf04659aa63 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 26 Feb 2024 15:52:55 +1300 Subject: [PATCH 4/4] aria role tree for comments --- app/templates/post/_comment_voting_buttons.html | 6 +++--- app/templates/post/_post_voting_buttons.html | 4 ++-- app/templates/post/_post_voting_buttons_masonry.html | 4 ++-- app/templates/post/continue_discussion.html | 6 +++--- app/templates/post/post.html | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/templates/post/_comment_voting_buttons.html b/app/templates/post/_comment_voting_buttons.html index 34718c1f..ce5294cc 100644 --- a/app/templates/post/_comment_voting_buttons.html +++ b/app/templates/post/_comment_voting_buttons.html @@ -1,14 +1,14 @@ {% if current_user.is_authenticated and current_user.verified %} {% if can_upvote(current_user, community) %} -
{% endif %} - {{ comment.up_votes - comment.down_votes }} + {{ comment.up_votes - comment.down_votes }} {% if can_downvote(current_user, community) %} -
diff --git a/app/templates/post/_post_voting_buttons.html b/app/templates/post/_post_voting_buttons.html index 6e7eff39..1434a4a1 100644 --- a/app/templates/post/_post_voting_buttons.html +++ b/app/templates/post/_post_voting_buttons.html @@ -1,6 +1,6 @@ {% if current_user.is_authenticated and current_user.verified %} {% if can_upvote(current_user, post.community) %} -
{{ shorten_number(post.up_votes) }} @@ -8,7 +8,7 @@
{% endif %} {% if can_downvote(current_user, post.community) %} -
{{ shorten_number(post.down_votes) }} diff --git a/app/templates/post/_post_voting_buttons_masonry.html b/app/templates/post/_post_voting_buttons_masonry.html index 1e9bc8a6..7ce6a438 100644 --- a/app/templates/post/_post_voting_buttons_masonry.html +++ b/app/templates/post/_post_voting_buttons_masonry.html @@ -1,13 +1,13 @@ {% if current_user.is_authenticated and current_user.verified %} {% if can_upvote(current_user, post.community) %} -
{% endif %} {% if can_downvote(current_user, post.community) %} -
diff --git a/app/templates/post/continue_discussion.html b/app/templates/post/continue_discussion.html index 07d27c6b..dae25ab5 100644 --- a/app/templates/post/continue_discussion.html +++ b/app/templates/post/continue_discussion.html @@ -13,7 +13,7 @@
{% macro render_comment(comment) %} -
+
{% if comment['comment'].author.deleted %} @@ -70,7 +70,7 @@
{% if comment['replies'] %} -
+
{% for reply in comment['replies'] %} {{ render_comment(reply) | safe }} {% endfor %} @@ -78,7 +78,7 @@ {% endif %}
{% endmacro %} -
+
{% for reply in replies %} {{ render_comment(reply) | safe }} {% endfor %} diff --git a/app/templates/post/post.html b/app/templates/post/post.html index 43e88033..71122e87 100644 --- a/app/templates/post/post.html +++ b/app/templates/post/post.html @@ -66,7 +66,7 @@
{% macro render_comment(comment) %}
+ {% if comment['comment'].author.id == post.author.id %}original_poster{% endif %}" aria-level="{{ comment['comment'].depth + 1 }}" role="treeitem">
{% if comment['comment'].author.deleted %} @@ -124,7 +124,7 @@
{% if comment['replies'] %} {% if comment['comment'].depth <= THREAD_CUTOFF_DEPTH %} -
+
{% for reply in comment['replies'] %} {{ render_comment(reply) | safe }} {% endfor %} @@ -144,7 +144,7 @@ {% endif %} {% endmacro %} -
+
{% for reply in replies %} {{ render_comment(reply) | safe }} {% endfor %}