Skip to content

Commit d45897b

Browse files
Simon-zhenfenghanzhenfeng
andauthored
Feature share (#504)
* #493: As a user, I want to share the diagram so that they can collaborate with me 1. when user click the button, browser will open a new window show the github survey page 2. regarding the implements: 2.1 I have to add an empty function for the share button, I don't know how to avoid that 2.2 I might need to change the share button position * Add tract event for share survey Co-authored-by: hanzhenfeng <[email protected]>
1 parent 6edc269 commit d45897b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/components/ContentWrap.jsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ export default class ContentWrap extends Component {
460460
trackEvent('ui', 'downloadJpeg');
461461
}
462462

463+
shareClickHandler(e) {
464+
trackEvent('ui', 'shareSurvey');
465+
}
466+
463467
async resetSplitting() {
464468
await this.setState({
465469
codeSplitSizes: this.getCodeSplitSizes(),
@@ -765,8 +769,6 @@ export default class ContentWrap extends Component {
765769
this.cm.js.setValue(codeService.addCode(code, param));
766770
}
767771

768-
gotoShareSurvey() {}
769-
770772
render() {
771773
return (
772774
<SplitPane
@@ -1003,13 +1005,13 @@ export default class ContentWrap extends Component {
10031005
<div class="demo-side" id="js-demo-side" style="overflow-y: auto; -webkit-overflow-scrolling: touch;">
10041006
{window.zenumlDesktop ? (null) : (
10051007
<div className='promotion'>
1006-
<div className="downloads">
1008+
<div className="actions">
10071009
<a href='https://github.com/ZenUml/web-sequence/discussions/496' target="_blank"
10081010
style={{textDecoration:'none'}}>
10091011
<Button
10101012
className="btn--dark button icon-button hint--rounded hint--bottom-left"
10111013
aria-label="Share Your Work"
1012-
onClick={this.gotoShareSurvey.bind()}>
1014+
onClick={this.shareClickHandler.bind(this)}>
10131015
<span className="material-symbols-outlined">share</span>
10141016
<span>Share</span>
10151017
</Button>

src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ body:not(.light-version).overlay-visible .main-container {
382382
font-weight: lighter;
383383
}
384384

385-
.demo-side .promotion .downloads {
385+
.demo-side .promotion .actions {
386386
margin-left: auto;
387387
display: flex;
388388
align-items: center;

0 commit comments

Comments
 (0)