Skip to content

Feat: Organization Social Media Links (new version from master) - #1097

Open
JoshKornfeld wants to merge 18 commits into
masterfrom
feat/social-media-links-new
Open

JoshKornfeld wants to merge 18 commits into
masterfrom
feat/social-media-links-new

Conversation

@JoshKornfeld

Copy link
Copy Markdown
Contributor

Description

Closes #1071

Backend:
Added a SocialMediaChannel & SocialMediaLink model. A channel is a constant that points to a social media site. The link binds this channel to an organization.
Updated serializers: organization.py and created new ones in social_media.py. Modified organization_views for creating/editing organizations.

Frontend:
Users can click a + icon on a chip that reads add social media. This opens a selectfield dialog from which they can pick from 5 different social medias. Depending on the type of social media, the user will need to either insert the full link or just the handle. A second textfield will open and will display the full URL for the user if only the handle is required. Once added, a chip dispaying the icon and name, with the option to delete it via a close button, will appear on the edit page. When the chip is hovered, the url will display. When viewing the organization page, the social media links will be displayed via their icons that when clicked, will open a new tab with their social media page opened.
The website of the organization has been moved from the center to the left under their avatar.
Also fixed where selecting empty field, the page doesn't crash for types or social media options.

TODOS:
Select field for German page has strange formatting. (dialog has a scroll, texts are too long).
Side note: for organization types, I don't believe whatever is being input into additional information is being saved to the backend

Test plan

  1. Create an organization
  2. Go through the steps and in the detailed input screen, chip should be visible. Clicking the + icon should open a dialog in which you can select a type of social media write a valid url for that specific social media.
  3. Click create after entering everything
  4. Click "edit organization"
  5. You can now also delete or modifiy existing urls

Before landing

  1. PR has meaningful title
  2. yarn lint passes (frontend)
  3. yarn format passes (frontend)
  4. make format passes (backend)

make black .
All changes included for social media links

@positiveimpact positiveimpact left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some comments

Comment thread frontend/src/components/dialogs/SelectDialog.js Outdated
Comment thread frontend/public/texts/organization_texts.js Outdated
Comment thread frontend/public/lib/socialMediaOperations.js Outdated
Comment thread frontend/src/components/account/AccountPage.js Outdated
Comment thread frontend/public/lib/socialMediaOperations.js Outdated
Comment thread backend/organization/views/organization_views.py Outdated
Comment thread frontend/pages/organizations/[organizationUrl].js Outdated
Comment thread frontend/public/lib/socialMediaOperations.js Outdated
Comment thread frontend/public/lib/socialMediaOperations.js
Comment thread frontend/src/components/general/SocialMediaButton.js Outdated
@ddhanesha

Copy link
Copy Markdown
Contributor

@JoshKornfeld please resolve all merge conflicts.

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.

Add social media links to organization page

3 participants