Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve event social share widget #6289

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

GovernmentPlates
Copy link
Member

@GovernmentPlates GovernmentPlates commented Apr 11, 2024

This PR removes the legacy social share widget and replaces it with a more modern share widget (as well as adding in support for Mastodon).

TODO:

  • Support adding a Mastodon server URL via the share widget (if none has been set by the user)
  • Implement behaviour after setting Mastodon server URL (redirect w/ params) + hide away MN button for un-auth'd users
  • Cleanup
  • Changelog entry

Preview:
image

@bpedersen2
Copy link
Contributor

Two comments:

  1. It would be nice to make the shown social providers configurable (per site would be ok)
  2. minor: twitter did change its name and logo :(

@ThiefMaster
Copy link
Member

ThiefMaster commented Apr 12, 2024

It would be nice to make the shown social providers configurable (per site would be ok)

If any API credentials etc were needed I'd agree, but since that's not the case I'm not so sure... is there any good usecase why someone would want to show just some social share options? In the end users can just copy the link manually to any social media site anyway

minor: twitter did change its name and logo :(

I think considering what most people think and also your smiley reaction at the end, we have some good arguments to stick with the old one :P

indico/modules/users/blueprint.py Outdated Show resolved Hide resolved
indico/web/client/js/custom_elements/ind_share_widget.js Outdated Show resolved Hide resolved
indico/web/client/js/custom_elements/ind_share_widget.js Outdated Show resolved Hide resolved
indico/web/client/js/custom_elements/ind_share_widget.js Outdated Show resolved Hide resolved
indico/web/client/js/custom_elements/ind_share_widget.js Outdated Show resolved Hide resolved
indico/web/client/js/custom_elements/ind_share_widget.js Outdated Show resolved Hide resolved
indico/web/assets/vars_js.py Outdated Show resolved Hide resolved
indico/modules/users/controllers.py Outdated Show resolved Hide resolved
indico/modules/users/util.py Outdated Show resolved Hide resolved
except requests.RequestException:
return None
try:
data = resp.json()
Copy link
Member

Choose a reason for hiding this comment

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

I think this may raise an error that's not handled if you get a successful response that's not valid JSON

indico/web/util.py Outdated Show resolved Hide resolved
indico/modules/users/blueprint.py Outdated Show resolved Hide resolved
indico/modules/users/controllers.py Outdated Show resolved Hide resolved
indico/modules/users/controllers.py Outdated Show resolved Hide resolved
indico/modules/users/__init__.py Outdated Show resolved Hide resolved
indico/web/util.py Outdated Show resolved Hide resolved
GovernmentPlates and others added 8 commits June 7, 2024 13:35
This fixes an issue where using `window.open()` would trigger the pop-up blocker in FF (and other browsers except Chrome)
* Use custom URL validator in both popup and user settings page
* Ensure mastodon server URL is included when exporting data
* Tweak user_vars and popup
* Split `<SocialButton>` component into two seperate components (reduce
  complexity)
* Fix i18n issues in `<CalendarButtons>` component
* Attempt to fix-up hardcoded margins
* Add success message when the event link copied
- Verify that a given Mastodon URL is valid
- Display Mastodon details (server name and domain) in UI
- Prevent long server names from breaking the UI
- Adjust validation
@GovernmentPlates GovernmentPlates marked this pull request as ready for review June 7, 2024 15:10
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.

None yet

4 participants