GithubHelp home page GithubHelp logo

compassionprojects / socialchange Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 823 KB

A home for all social change stories where NVC is a part of

Home Page: https://nvcsocialchange.org

License: GNU General Public License v3.0

Ruby 73.91% JavaScript 3.71% HTML 21.10% Shell 0.08% SCSS 0.59% CSS 0.60%
empathy peace socialchange nonviolent-communication nvc postgresql rails ruby

socialchange's People

Contributors

dependabot[bot] avatar madhums avatar

Stargazers

 avatar  avatar

socialchange's Issues

add notifications

Users should be able to subscribe to get notified when a new discussion, story update or a new post is created for a story/discussion.

subscriptions:
--------------
story
discussion
user
subscribed_to: new_discussions | new_posts | new_story_updates

We need to provide a notification preferences page where user is able to set preferences.
For the subscriptions, the page should list the story / discussion user is subscribed to and must give an option to unsubscribe.

Todo:

Preferences:

  • add user preferences migration, model and tests
  • create user preference once user confirms his account
  • add user preferences page

Notifications:

  • add noticed gem
  • create models for story, discussion and post notifications
  • create email templates
  • add translations
  • display notifications in the UI
    • show unread notifications indicator

add ability to invite collaborators to projects

Todo:

  • add story contributions and related models
  • write model tests
  • add pundit policies
    • test the same
  • send invitations to users
  • send notifications
  • display contributors in the UI
  • allow only contributors and story creators to invite
  • allow contributors to remove other contributors
  • allow users to leave a story

add community discussions to projects

User story:

As a user, part of the social change community, I'd like to learn more about these stories by engaging with the creators. Understanding the difficulties, hardships faced while implementing such a project gives me ease and clarity in organising similar initiatives/projects in my neighbourhood/circle.

For this, I'd like to create a topic and describe it. Members of the community/story can respond to the thread. And I'd like to receive notification when someone responds. I'd also like to be able to subscribe to notifications on topics I am interested in.

As a story creator myself, I'd like to be able to moderate discussions, meaning, I should be able to delete topics/responses that are offensive / spam / irrelevant. I'd also like to be able to flag responses as inappropriate/spam, so that a community manager is able to take action on it.

As a topic creator, I'd like to be able to delete the discussion which I just created. I'd also like to be able to edit and correct any mistakes.

[bug] missing translations for dates

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://socialchange.fly.dev
  2. Click on 'Explore'
  3. You see the dates don't have proper translations Translation missing: en.datetime.distance_in_words.short.about_x_years by Madhu

Expected behavior
The date should say "a year ago" instead of missing translation error

Screenshots
image

Desktop (please complete the following information):

  • OS: Linux, Windows, Mac
  • Browser: All
  • Version: All

Smartphone (please complete the following information):

  • Device: All
  • OS: All
  • Browser: All
  • Version All

Additional context
None

misc story improvements

Improvements:

  • display that the content is not translated in the language being viewed
  • #48
  • adding/editing story: disable submit while attaching documents
  • use a helper method to display all form errors (rn it's duplicated in stories/form and users/shared/error messages

Tests:

  • search using mobility and ransack #47
  • story translations #47
  • story listings
  • discard feature

Following up on #29

allow adding of a category if it doesn't exist

  • Add categories model/migration
  • Add category to stories
  • Add category management to admin
  • Make sure category supports multiple languages
  • Add ability to create a category if it doesn't exist while creating a story

add ability to crud stories

  • keep "policy change" as overarching goal while designing projects
  • create project
  • edit project
  • delete project
  • show project
  • upload documents/photos
  • crud followups/updates

user story for stories

Projects are the core of social change.

Users can create many projects and add other users are collaborators.

A project has a title, description, time frame (start/end dates), outcomes, societal change, intention, location, attachments (photos/documents), perhaps a website/community link. Some of these fields should be translatable to other languages.

A project should also have a category or tags.
Projects have discussions where people are able to create topics and discuss them.
A project also has settings which enable discussions and manage collaborators.

Collaborators can have a few roles (moderator, editor, admin).

Moderators and Admins are able to moderate discussions (edit/delete topics/discussions).
Editors and Admins of the projects can followup by posting updates.
Only Admins are able to change project settings.

A project can have a state, draft - while writing, published - when published and archived - when archived. Only Admins of the projects are able to archive the projects.

Projects interface should be designed in a way with a focus towards bringing policy change in locally or globally.

update translations

  • update dutch translations
  • add any other language and it's translations we want to support

creating first story update doesn't update the UI

When creating the first story update of a story, doesn't update the UI. It's seen only after refreshing a page.

Steps to reproduce:

  1. Go to a story that doesn't have a story update
  2. Click on "new story update" and create a story update
  3. I expect to see the story update but nothing happens
  4. Refresh the page, then it appears.

ExampleException in home#example

Test error in Example.com

ExampleException in home#example
Something really bad happened

View on Bugsnag

Stacktrace

app/controllers/home_controller.rb:123 - example
app/controllers/other_controller.rb:12 - broken
lib/important/magic.rb:4 - load_something

View full stacktrace

Created by Madhu via Bugsnag

allow user to follow stories and discussions

Following #38, we'd want a user to follow stories and discussions.

  • When a user follows a story, he gets notified of any new story updates and discussions.
  • When a user follows a discussion, he gets notified of posts.

We can add a polymorphic association like so:

# app/models/user_subscription.rb
class UserSubscription < ApplicationRecord
  belongs_to :user
  belongs_to :subscribable, polymorphic: true
end

# app/models/user.rb
class User < ApplicationRecord
  has_many :user_subscriptions
end

# app/models/story.rb
class Story < ApplicationRecord
  has_many :discussions
  has_many :user_subscriptions, as: :subscribable
end

# app/models/discussion.rb
class Discussion < ApplicationRecord
  belongs_to :story
  has_many :posts
  has_many :user_subscriptions, as: :subscribable
end

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.