Usability suggestions for Copr web interface
by Martin Cigorraga
Hi all,
First of all I want to say I'm really happy for having Copr, being an
Arch user for many, many years I got really used to the AUR (Arch User
Repository) so I can see Copr potential.
And speaking about that, I would like to make some suggestions to
improve the 'community' side of Copr as I believe from what I read the
technical side is already very well covered:
1. Copr needs a place where users and packager(s) can discuss stuff
about the packages and repositories, that could be achieved by simply
letting logged people to comment on each Copr repo page;
2. Likewise it would be nice to have a way to: a) contact the
packager(s)/maintainer(s), b) flag outdated packages, inform about any
errors found.
Having the chance for community to interact ultimately leads to
improved workflows and better quality projects; some folks will look
for guidance to create their first Copr repo, other people may want to
lend a hand and offer maintain a repo packed with the stuff they
usually use while others can just offer tips for improve things - or
ask for assistance as well!
Hope you guys take my suggestions in a positive way, I'm already happy
to have a great infrastructure like Copr already set and ready for
anyone to use, kudos!
-Martín
8 years, 3 months
[PATCH] [frontend] Add optional fedmenu resources to every page.
by Ralph Bean
This is for https://fedoraproject.org/wiki/Fedora_Engineering/FY16_Plan
If the FEDMENU_URL and FEDMENU_DATA_URL options are left out of the
config, then nothing should change on the displayed page. If they are
included, then they will be pulled in at page load time to render little
menu buttons on the bottom right hand corner of the page.
There's an example up at http://threebean.org/fedmenu/
It will be a while until we are able to turn this on globally across all
our apps.
---
frontend/coprs_frontend/config/copr.conf | 4 ++++
frontend/coprs_frontend/coprs/__init__.py | 2 +-
frontend/coprs_frontend/coprs/context_processors.py | 11 +++++++++++
frontend/coprs_frontend/coprs/templates/layout.html | 16 ++++++++++++++++
4 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/frontend/coprs_frontend/config/copr.conf b/frontend/coprs_frontend/config/copr.conf
index ab4fb96..064baa4 100644
--- a/frontend/coprs_frontend/config/copr.conf
+++ b/frontend/coprs_frontend/config/copr.conf
@@ -45,6 +45,10 @@ SEND_EMAILS = True
## post-process url leading to frontend
# ENFORCE_PROTOCOL_FOR_FRONTEND_URL = "https"
+# URLs for fedmenu resources
+#FEDMENU_URL = "http://threebean.org/fedmenu/"
+#FEDMENU_DATA_URL = "http://threebean.org/fedmenu/dev-data.js"
+
# Kerberos authentication configuration. Example configuration abbreviated
# like 'RH' (should not changed once used, reflects what is stored in database).
# This requires mod_auth_kerb package (Fedora/RHEL) installed on your frontend
diff --git a/frontend/coprs_frontend/coprs/__init__.py b/frontend/coprs_frontend/coprs/__init__.py
index e86bb64..032ed4d 100644
--- a/frontend/coprs_frontend/coprs/__init__.py
+++ b/frontend/coprs_frontend/coprs/__init__.py
@@ -52,7 +52,7 @@ from coprs.views import recent_ns
from coprs.views.recent_ns import recent_general
from coprs.views.stats_ns import stats_receiver
-from .context_processors import include_banner
+from .context_processors import include_banner, inject_fedmenu
setup_log()
diff --git a/frontend/coprs_frontend/coprs/context_processors.py b/frontend/coprs_frontend/coprs/context_processors.py
index b84c241..895bb03 100644
--- a/frontend/coprs_frontend/coprs/context_processors.py
+++ b/frontend/coprs_frontend/coprs/context_processors.py
@@ -10,3 +10,14 @@ def include_banner():
return {"copr_banner": open(BANNER_LOCATION).read()}
else:
return {}
+
+
+(a)app.context_processor
+def inject_fedmenu():
+ """ Inject fedmenu url if available. """
+ if 'FEDMENU_URL' in app.config:
+ return dict(
+ fedmenu_url=app.config['FEDMENU_URL'],
+ fedmenu_data_url=app.config['FEDMENU_DATA_URL'],
+ )
+ return dict()
diff --git a/frontend/coprs_frontend/coprs/templates/layout.html b/frontend/coprs_frontend/coprs/templates/layout.html
index bef3fbf..f9981e9 100644
--- a/frontend/coprs_frontend/coprs/templates/layout.html
+++ b/frontend/coprs_frontend/coprs/templates/layout.html
@@ -58,5 +58,21 @@
</small>
</p>
</div>
+
+{% if fedmenu_url is defined %}
+<script src="{{fedmenu_url}}/js/fedora-libravatar.js"></script>
+<script src="{{fedmenu_url}}/js/fedmenu.js"></script>
+<script>
+ fedmenu({
+ 'url': '{{fedmenu_data_url}}',
+ 'mimeType': 'application/javascript',
+ 'position': 'bottom-right',
+ {% if copr is defined %}
+ 'user': '{{copr.owner.name}}',
+ {% endif %}
+ });
+</script>
+{% endif %}
+
</body>
</html>
--
2.1.0
8 years, 4 months