Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Share Dialog #1948

Merged
merged 16 commits into from
Jun 15, 2018
Merged

Share Dialog #1948

merged 16 commits into from
Jun 15, 2018

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Jun 12, 2018

Implements a share dialog for users rooms and groups
fixes ContextMenu such that it can overlay modals if needed
fixes BaseDialog and a typo in a Dialog
specs some more PropTypes which were previously used but not specified

image

Requires matrix-org/matrix-js-sdk#656

Fixes element-hq/element-web#877

Fixes element-hq/element-web#2943

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@Half-Shot
Copy link
Contributor

Looks pretty nifty 👍.

The social icons seem pretty arbitrary and feel like they'd be nicer as config options, or at least make them configurable.

@t3chguy
Copy link
Member Author

t3chguy commented Jun 12, 2018

It'd be very easy to make this configurable, given its written in a data-driven manner, will poke toml about it

his mockup was:
image

@@ -16,7 +16,7 @@ limitations under the License.

.mx_ContextualMenu_wrapper {
position: fixed;
z-index: 2000;
z-index: 5000;
Copy link
Member

Choose a reason for hiding this comment

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

uh...

Copy link
Member Author

Choose a reason for hiding this comment

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

the Modal sits at Z 4000
so it needs to be higher

@@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2018 Vector Creations Ltd
Copy link
Member

Choose a reason for hiding this comment

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

We're New Vector now

Copy link
Member Author

Choose a reason for hiding this comment

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

whoops, will fix

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@@ -1295,10 +1303,13 @@ module.exports = React.createClass({

<div className="mx_UserSettings_section">
<div className="mx_UserSettings_advanced">
{ _t("Logged in as:") } { this._me }
{ _t("Logged in as:") + ' ' }
<span onClick={this.onSelfShareClick} className="mx_UserSettings_link">
Copy link
Member

Choose a reason for hiding this comment

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

Please don't put onClicks on spans: it's styled to look like a link on the screen, but to people using a screen reader this is just text. A thing that causes a dialog to pop up when you click on it is a button, or failing that, a hyperlink.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,211 @@
/*
Copyright 2018 Vector Creations Ltd
Copy link
Member

Choose a reason for hiding this comment

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

New Vector

Copy link
Member Author

Choose a reason for hiding this comment

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

Argh

Copy link
Member Author

Choose a reason for hiding this comment

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

done

img: 'img/social/',
url: (url) => `https://plus.google.com/share?url=${url}`,
},*/ {
name: 'Linked In',
Copy link
Member

Choose a reason for hiding this comment

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

There's no space in LinkedIn.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

this.onCheckboxClick = this.onCheckboxClick.bind(this);

this.state = {
ticked: false,
Copy link
Member

Choose a reason for hiding this comment

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

What is ticked? The whole dialog?

e.target.onmouseleave = close;
}

onCheckboxClick() {
Copy link
Member

Choose a reason for hiding this comment

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

As per 'ticked', some name suggestive of what the checkbox is for would be nice.


<div className="mx_ShareDialog_split">
<div className="mx_ShareDialog_left">
<h3>QR Code</h3>
Copy link
Member

Choose a reason for hiding this comment

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

I'd argue that if you know how to use a QR code, you probably don't need to be told that this is one.

Copy link
Member Author

Choose a reason for hiding this comment

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

So you want to see the "QR Code" and "Social" headers disappear? or just one and have it lobsided

Copy link
Member Author

Choose a reason for hiding this comment

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

image

@dbkr whatcha think?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I would say remove both - that lgtm. @lampholder ?

Copy link
Member

Choose a reason for hiding this comment

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

(He say yes)

<h3>Social</h3>
<div className="mx_ShareDialog_social_container">
{
socials.map((social) => <a target="_blank"
Copy link
Member

Choose a reason for hiding this comment

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

rel="noopener"

Copy link
Member Author

Choose a reason for hiding this comment

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

ty

Copy link
Member Author

Choose a reason for hiding this comment

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

done

href={social.url(encodedUrl)}
className="mx_ShareDialog_social_icon"
>
<img src={social.img} height={64} width={64} />
Copy link
Member

Choose a reason for hiding this comment

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

alt={social.name} surely?

Copy link
Member Author

Choose a reason for hiding this comment

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

ty

Copy link
Member Author

Choose a reason for hiding this comment

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

done

fix copyright headers
fix user settings link accessibility
fix typo and add noopener

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy assigned dbkr and unassigned t3chguy Jun 14, 2018
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy
Copy link
Member Author

t3chguy commented Jun 14, 2018

@dbkr PTAL

@dbkr dbkr merged commit 6904c2b into develop Jun 15, 2018
@t3chguy t3chguy deleted the export_Group branch May 25, 2020 18:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants