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

Normalise dialogs#1674

Merged
dbkr merged 16 commits into
matrix-org:developfrom
aidalgol:rebase-dialogs
Jan 11, 2018
Merged

Normalise dialogs#1674
dbkr merged 16 commits into
matrix-org:developfrom
aidalgol:rebase-dialogs

Conversation

@aidalgol
Copy link
Copy Markdown

@aidalgol aidalgol commented Dec 23, 2017

  • Rewrite dialogs to use BaseDialog.
  • Add a DialogButtons component to be used in most dialog components for the purpose of normalising the order of dialog buttons.

Addresses element-hq/element-web#5689

Signed-off-by: Aidan Gauland aidalgol@fastmail.net

Some dialogs need to set additional classes on the `mx_Dialog_title` `div`
element (for example `danger`).
A component to normalise the buttons in dialogs.
Use DialogButtons to eliminate duplicate button code.
Use DialogButtons to eliminate duplicate button code.
Use DialogButtons to eliminate duplicate button code.
We can't use DialogButtons because the primary button is an <input> element.
Use DialogButtons to eliminate duplicate button code.
Use DialogButtons to eliminate duplicate button code.
Use DialogButtons to eliminate duplicate button code.
Use DialogButtons to eliminate duplicate button code.
Use DialogButtons to eliminate duplicate button code.

propTypes: {
// The primary button which is styled differently and has default focus.
primaryButton: React.PropTypes.node.isRequired,
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.

please use PropTypes and import PropTypes from 'prop-types'; as React.PropTypes is going away

Use PropTypes from "prop-types" instead of the deprecated React.PropTypes
submodule.
Copy link
Copy Markdown
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

Couple of minor things, but otherwise this looks good, thanks!

limitations under the License.
*/

"use strict";
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.

This isn't necessary now

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Is that referring to the "use scrict"? The lines you've highlighted make this a bit unclear.

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.

Yes, sorry - use strict isn't necessary in a module (they're all implicitly strict).

@@ -0,0 +1,62 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
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.

You wrote this file, so you should claim the copyright

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants