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

Move 'new version' support into Platform #2532

Merged
merged 8 commits into from
Nov 3, 2016
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Nov 2, 2016

  • Allow platforms to specify release notes
  • Make web update checking much, much simpler (ie. not manually using XMLHTTPRequest)

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

Is there another bit of this that wires up new_version?

onFinished: (update) => {
if(update) {
window.location.reload();
if (props.releaseNotes) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: I feel like this should be two separate functions

Copy link
Member

Choose a reason for hiding this comment

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

still think this needs splitting

@richvdh richvdh assigned dbkr and unassigned richvdh Nov 2, 2016
@richvdh
Copy link
Member

richvdh commented Nov 2, 2016

Oh, found it: matrix-org/matrix-react-sdk#532

For template methods that are only used from within vector (ie. new version
support)
@dbkr dbkr assigned richvdh and unassigned dbkr Nov 2, 2016
onFinished: (update) => {
if(update) {
window.location.reload();
if (props.releaseNotes) {
Copy link
Member

Choose a reason for hiding this comment

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

still think this needs splitting

Modal.createDialog(ChangelogDialog, {
version: props.version,
newVersion: props.newVersion,
releaseNotes: releaseNotes,
Copy link
Member

Choose a reason for hiding this comment

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

releaseNotes seems to be undefined here.

if (checkVersion(props.version) && checkVersion(props.newVersion)) {
changelog_button = <button className="mx_MatrixToolbar_action" onClick={onChangelogClicked}>Changelog</button>;
let action_button;
if (props.releaseNotes || (checkVersion(props.version) && checkVersion(props.newVersion))) {
Copy link
Member

Choose a reason for hiding this comment

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

I could do with a comment here explaining that we show a questiondialog if we have releasenotes, or a changelogdialog if we don't.

@richvdh richvdh assigned dbkr and unassigned richvdh Nov 2, 2016
and change the class to use React createClass syntax while I'm at
it, rather than a completely different third style we use nowhere
else in the project.
@dbkr dbkr assigned richvdh and unassigned dbkr Nov 2, 2016
@dbkr
Copy link
Member Author

dbkr commented Nov 2, 2016

ptal

releaseNotes: React.PropTypes.string,
},

onChangelogClicked: function() {
Copy link
Member

Choose a reason for hiding this comment

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

better but why not just bind displayReleaseNotes or displayChangelog to the button in render instead, since you're already doing the conditions there?

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm otherwise

@richvdh richvdh assigned dbkr and unassigned richvdh Nov 3, 2016
@dbkr dbkr merged commit efd0dab into develop Nov 3, 2016
@t3chguy t3chguy deleted the dbkr/platform_version branch May 12, 2022 08:55
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.

2 participants