Giter Site home page Giter Site logo

liqd / a4-meinberlin Goto Github PK

View Code? Open in Web Editor NEW
38.0 9.0 6.0 16.21 MB

The central participation platform of the city of Berlin, Germany

Home Page: https://mein.berlin.de

License: GNU Affero General Public License v3.0

Python 69.14% HTML 16.81% Makefile 0.40% CSS 0.10% Shell 0.12% JavaScript 8.75% SCSS 4.67%
e-participation civic-tech berlin citizen-participation django liquid-democracy

a4-meinberlin's People

Contributors

2e2a avatar fuzzylogic2000 avatar goapunk avatar greenkeeper[bot] avatar hklarner avatar hmkay avatar hom3mad3 avatar ihucos avatar kleingeist avatar m4ra avatar magdan avatar mcastro-lqd avatar mkind avatar philli-m avatar pyup-bot avatar renovate-bot avatar renovate[bot] avatar rineee avatar rmader avatar sabinammm avatar slomo avatar vellip avatar weblate avatar xi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

a4-meinberlin's Issues

Fix filter bar overlap

The filter bar is supposed to overlap its box in some cases:

screenshot from 2017-04-10 14 37 24

As you can see, the current implementation displaces the stats of the first list item.

A lot of work and thought was already put into this in #144, but with limited success. A workaround which disables the overlap was pushed in #165.

Styling issues in header area at 800px width

The header area shows some strange styling errors when the width is set to 800px (tested on Safari 10.0.3).

  1. The menu is always shown in an open state
  2. The label for the project type has almost no vertical margin to the top navigation

The seocond problem persists even for smaller widths. The first problem I can only produce at 800px viewport width.

bildschirmfoto 2017-04-25 um 15 25 33

Forgot Password? // Log In (Primary and secondary brand colour)

I accidentally click on the magenta button because my brain expects it to be the button that logs me in. I think this is because it is positioned on the very left while the log in comes in second place. Also its color is much stronger.

Suggestion:
Log In button comes first
Password Forgotten follows below, maybe styled as a link instead of a button

bildschirmfoto 2017-05-05 um 16 27 24

JS error in page with embedded project

Uncaught SyntaxError: Unexpected token o in JSON at position 1 <embed.js:108>


For some reason, when loading the page containing the iframe, it seems the message handler gets triggered and has an object {request: 'geturi'} in event.data.

Maybe its from a browser extension?

Decide on using title vs aria-label

When we have buttons that only contain an icon and maybe in some other cases, we need to provide an alternative text (WCAG 1.1.1). There are a lot of options for that, but currently we use of of these two:

  • aria-label: <button><i class="fa" aria-label="alt text"></i></button>
  • title: <button title="alt text"><i class="fa" aria-hidden="true"></i></button>

Both options have pros and cons, but we should have clear rules on when to use which one.

Animation for polls

It would be really cool to have a build-up animation for the graph in our polls.

A transition that builds up the bars from left to right would not just be pretty, it would also create a better sense for what's happening.

Move non-generated files from static to assets

Currently we are mixing generated and custom content in /static
I propose to move all custom content (images, js, scss) to assets and copy them with webpack to static.
This would enable us to completely ignore the /static/ folder ing git

embed: fixed button for navigating back

Navigating inside the embed should be easier. A fixed "Back"-button would help a lot. It would also bring out the application-based concept more.

Here's an old wireframe that features such a button.

bildschirmfoto 2017-04-27 um 17 28 35

Consistent URL design

Most of our URLs are not hierarchical. For example, the path to a project is /projects/{project_slug}/ rather than /organisations/{organisation_slug}/projects/{project_slug}. However, the paths in the dashboard are hierarchical.

The hierarchical style lead to some security issues (e.g. #162). The issue was that the URL contains redundant information (i.e. the organisation is given both explicitly and implicitly from the project). We failed to check that the two match up which allowed initiators from one organisation to edit another organisation's projects.

I personally prefer the hierarchical style, e.g. on github. But note that github issue ids are scoped to the project, so there is no redundant information.

I do not think that one style is more secure than the other. But I mixing them leads to confusion. We should pick one of these options, ideally before going live:

  1. Use hierarchical paths and check for consistency.
  2. Use hierarchical paths with scoped slugs.
  3. Use non-hierarchical paths.

Given the current code base, I think it third option is the easiest to implement. I also think that hierarchical paths are mostly useful for people with a technical background, so not really that important for our target group.

Login: Login button should be first

Currently in the login form, the password reset button comes before the login button. This should be changed, so that the login button comes first. I also think, we should maybe de-emphasize the password reset somehow (maybe make it a link in a small text underneath?).

bildschirmfoto 2017-05-12 um 11 14 26

Have a concept for optional frontend libraries

Some frontend libraries are only used on specific pages (e.g. leaflet for maps). Sometimes we just include these libraries in the webpack bundle so that it gets quite big (~1.5MB at the moment). Sometimes we only load them on the pages where they are needed, which adds complexity.

We should find a consistent solution for this which balances performance and code complexity.

No project reference when creating new idea

When I try to create a new idea, the project the idea is created in, is not referenced. This might be confusing, especially if you leave the tab in my browser open and come back later. It would be great if we show at least the project’s title, short description and maybe organization.

bildschirmfoto 2017-04-24 um 15 33 41

Explain what follow means

It would be great if we could explain what following means with a short notice (maybe after clicking on the button?), something like this: ”You will be notified via email when new proposals are posted or when the project’s phase changes“.

bildschirmfoto 2017-05-11 um 17 26 58

Delete Follows

We need to delete follows at some point, e.g. when the project is archived or deleted.

Webpack generates broken variable name

With the setup since #278, webpack generates the following code:

var leaflet.draw = …

This breaks some mapping functionality.

Possible fix: rename bundle to leafletDraw.

webpack issues

I recently experienced difficulties with the javascript generated webpack. On first build, everything works fine. Subsequent build look considerably different (e.g. the parantheses around function are missing) and the the following error message is shown in the JavaScript console:

 Uncaught TypeError: Cannot read property 'call' of undefined

This means that a module that webpack is trying to initiate is undefined.

Cost for proposals should be emphasized

When I read a proposal for a participatory budget is very central. It would be great, if we could emphasize the budget visually and give it a label „Estimated cost by user“ or similar. I would also use dividers for thousands of euros like so: 1.000.000 €

Could we show the cost in the list view, too?

bildschirmfoto 2017-04-24 um 15 46 49

The project is not referred on idea detail page

If you are on an idea detail page, the project the idea is linked to is not referenced. It would be important to show at least the project’s title to make the connection between project and idea clear to the user.

bildschirmfoto 2017-04-24 um 15 42 05

Button to confirm email address invisible

After adding a new email address in the account settings and clicking on the link in the verification email, user have to click another button in the confirm-email dialogue (is this necessary?) - in Firefox this button is not visible - only writing black on white
bildschirmfoto 2017-05-09 um 13 36 05
(see screenshot).

Leaflet assets not found

When I visit a page with a map, I get the following errors in the web console:

GET http://localhost:8000/static/leaflet.js 
GET http://localhost:8000/static/leaflet.css 

This is because core expects these files, but we include leaflet in our regular bundle. It is not clear which behavior is more correct yet (see discussion in #195). But we should handle the error messages anyway.

API validation of documents and polls should not set module

Currently the .validate() methods of the Documents and Poll Serializers are setting the related module. Consider using a HiddenField for the module which could be set from the kwargs. Compare the creator fields which is set with:

creator = serializers.HiddenField( default=serializers.CurrentUserDefault() )

Project-Detail view is broken if the initial phase is in the future

If a projects initial phase starts in the future, the default a4projects/project_detail.html is rendered.
This template is by default empty and should be overridden. Currently this is tried by apps/projects/a4projects/project_detail.html which is not working. Django is still using the a4 template.
Furthermore the project_detauil template is missing logic and information if no phase has been started yet

Manage duplication between projects

Our projects tend to have a large overlap in terms of features and UI. In the past we tried to limit duplication by sharing a lot of code. The downside of this was that the shared code became very abstract and hard to reason about.

With the switch from a3 to a4, we went the other way and did a lot of duplication. In order to find a good balance, we should think about ways to limit duplication while keeping it simple. At the very least, we should have an understanding of:

  • what is our current approach to code duplication between projects?
  • what are its advantages and limitations?

According to @2e2a, we already have a good balance in the python code. The same is true for CSS. So for now we can concentrate on the templates.

We already tried to work on this in some pull requests (#206, #237, #239). We found that the templates are in fact very similar, but also different in some key places:

  • similar but different permissions (e.g. create_idea / create_proposal) (see #206)
  • similar but different URL names (e.g. idea-create / proposal-create) (see #206)
  • similar but different navigation (breadcrumbs)
  • different terms that appear in natural language sentences (e.g. "Delete this idea" / "Delete this proposal")

Make filters more dynamic

Currently filters have two issues:

  • Allow dynamic choices for OrderingFilter (currently fixed by the RequestOrderingMixin)
  • Allow custom choices for more widget types, e.g. BooleanFilter, NumberFilter (currently fixed by overloading the widget init)

Static/Assets directories in apps

Django says to include app specific static files in a /static directory in the root of the particular app (https://docs.djangoproject.com/en/1.11/howto/static-files/). On runserver Django collects static files from the project wide static directory (mentioned in base.py) and the /static directories within all apps, grouping them into one global /static directory.
Now, we don't need .jsx files in that global /static directory since they are required and put together into one file by webpack. Still, those files need a directory to be put into on app level – therefore sometimes there might be an asset directory instead of a static directory or the other way around.
It'd be great to have one directory and in the best case that would include not having .jsx files in that django-generated, global /static directory.

Filter draft projects from public listing

Mark draft projects with a badge or something when a moderator is browsing the project list. Currently every project is listed and logged in moderators can only find out if they are drafted in the dashboard or with an incognito browser.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.