-
Notifications
You must be signed in to change notification settings - Fork 411
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
base: master
Are you sure you want to change the base?
Conversation
cb81000
to
a64efa9
Compare
a64efa9
to
dadc9c2
Compare
dadc9c2
to
9b3079f
Compare
Two comments:
|
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
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 |
9b3079f
to
b0f6d17
Compare
c5dfabb
to
13721c1
Compare
13721c1
to
a2fb104
Compare
font-size: 1.4em !important; | ||
margin: -2.8px 100px 8.5px !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big fan of the hard-coded font sizes and margins. Would it be possible to use some existing SUI options/components to get the same look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did initially try to do some stuff with the existing SUI options/components, but I found that trying to center this large heading using the stuff in SUI didn't work inside the popup (hence why I have hardcoded the margin
). As for the font-size
; the available sizes in SUI just didn't really cut it for me, and made everything else look a bit weird...
But I will give this another try.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After playing around with this, I still cannot use SUI to do this (specifically the textAlign
property). Although, doing this myself did lead to a somewhat similar outcome:
<div styleName="header-text">
<Icon name="share alternate" styleName="icon" />
<Translate as="strong">Share this page</Translate>
</div>
.header-text {
font-size: 1.6em;
text-align: center;
margin: 5px 0 5px 0;
.icon {
margin-right: 5px;
}
}
I'm not sure wether this might be an 'improvement' though... any thoughts?
9b82730
to
73aee23
Compare
Show popup if none is set by the user (WIP)
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
73aee23
to
0dfea5c
Compare
(WIP)
except requests.RequestException: | ||
return None | ||
try: | ||
data = resp.json() |
There was a problem hiding this comment.
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
if url.scheme not in ('http', 'https'): | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should be moved into the validator(s)?
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:
Preview: