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

Support for live sharing in the Playground #50

Merged
merged 28 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
1af7930
Added Monaco's new dist files
kolovos Feb 3, 2025
79a2eb1
Replaced ace editors with monaco - no syntax highlighting yet
kolovos Feb 3, 2025
6c298c6
Added initial version of syntax highlighting for EOL and EVL
kolovos Feb 3, 2025
6ad25c9
Added syntax highlighting for all Emfatic and all Epsilon languages b…
kolovos Feb 4, 2025
350bce9
First version of EGL syntax highlighting
kolovos Feb 4, 2025
dff2261
Tidied up EGL syntax highlighting
kolovos Feb 4, 2025
c4d571f
Improved syntax highlighting and console
kolovos Feb 5, 2025
e005874
Tidied up default theme definition
kolovos Feb 5, 2025
81512d5
Added initial version of link provider to the console
kolovos Feb 5, 2025
e7ddd7d
Completed syntax highlighting and console links
kolovos Feb 5, 2025
f8b67e2
Removed ACE dependency and related code
kolovos Feb 5, 2025
8b396ba
Fixed annotation highlighting and tidied up editors
kolovos Feb 5, 2025
40f2e8f
Use new docker images and restore only backend.json
kolovos Feb 5, 2025
e8b7a37
Improved language setting in output panel
kolovos Feb 5, 2025
6368acf
Fixed multi-line comment syntax highlighting
kolovos Feb 10, 2025
77c2bb5
Initial version of live sharing
kolovos Feb 14, 2025
d06b0c7
Kroki and YJS urls moved to backend.json
kolovos Feb 14, 2025
7ab3aab
Upgraded metro
kolovos Feb 14, 2025
abbd7aa
Commented out experimental code that tests the yjs server
kolovos Feb 14, 2025
aca6d27
Enabled source maps in webpack
kolovos Feb 14, 2025
0c68f60
Fail gracefully when yjs server is not available
kolovos Feb 15, 2025
b1052a7
Updated yjs url
kolovos Feb 16, 2025
ba7825a
Tweaked live share button caption
kolovos Feb 16, 2025
d1506b9
Webpack production build
kolovos Feb 16, 2025
d6216d7
Minor tweaks to live sharing ui
kolovos Feb 17, 2025
673d7c3
Updated webpack build
kolovos Feb 17, 2025
749f764
Minor ui tweaks and cleanups
kolovos Feb 17, 2025
5c92ae5
Restored dist from main branch in preparation for PR
kolovos Feb 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mkdocs/docs/playground/backend.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
{"name": "RunEpsilonFunction", "url": "https://uk-ac-york-cs-epsilon-playground.h5rwqzvxy5sr4.eu-west-1.cs.amazonlightsail.com/epsilon"},
{"name": "FlexmiToPlantUMLFunction", "url": "https://uk-ac-york-cs-epsilon-playground.h5rwqzvxy5sr4.eu-west-1.cs.amazonlightsail.com/flexmi2plantuml"},
{"name": "EmfaticToPlantUMLFunction", "url": "https://uk-ac-york-cs-epsilon-playground.h5rwqzvxy5sr4.eu-west-1.cs.amazonlightsail.com/emfatic2plantuml"},
{"name": "ShortURLFunction", "url": "https://l4p4ni4wo4lqtxk4qfedsapbtm0olxqn.lambda-url.eu-west-1.on.aws/"}
{"name": "ShortURLFunction", "url": "https://l4p4ni4wo4lqtxk4qfedsapbtm0olxqn.lambda-url.eu-west-1.on.aws/"},
{"name": "Yjs", "url":"wss://uk-ac-york-cs-epsilon-yjs.h5rwqzvxy5sr4.eu-west-1.cs.amazonlightsail.com/ws/", "public": "wss://demos.yjs.dev/ws"},
{"name": "Kroki", "url": "https://uk-ac-york-cs-epsilon-kroki.h5rwqzvxy5sr4.eu-west-1.cs.amazonlightsail.com"}
]
}
4 changes: 3 additions & 1 deletion mkdocs/docs/playground/backend.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
{"name": "RunEpsilonFunction", "url": "http://localhost:8080/epsilon"},
{"name": "FlexmiToPlantUMLFunction", "url": "http://localhost:8080/flexmi2plantuml"},
{"name": "EmfaticToPlantUMLFunction", "url": "http://localhost:8080/emfatic2plantuml"},
{"name": "ShortURLFunction", "url": "http://localhost:8080/shorturl"}
{"name": "ShortURLFunction", "url": "http://localhost:8080/shorturl"},
{"name": "Yjs", "url": "ws://localhost:1234", "alternative": "wss://demos.yjs.dev/ws"},
{"name": "Kroki", "url": "https://uk-ac-york-cs-epsilon-kroki.h5rwqzvxy5sr4.eu-west-1.cs.amazonlightsail.com"}
]
}
25 changes: 15 additions & 10 deletions mkdocs/docs/playground/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@
content: url("../images/maximise.png");
}

.mif-liveshare::before {
content: url("../images/liveshare.png");
}

.active-toggle .icon .mif-folder::before {
content: url("../images/open-folder.png");
}
Expand Down Expand Up @@ -226,16 +230,6 @@ body {
display:none;
}

.ace_gutter {
background-color: white !important;
border-right: 1px solid rgb(215,215,215) !important;
z-index: 0;
}

.ace_gutter-active-line {
background-color: white !important;
}

#preloader {
position: fixed;
height: 100%;
Expand Down Expand Up @@ -308,3 +302,14 @@ body {
text-align:center;
color: rgb(205, 53, 44);
}

#liveShareStatus {
background-color1: #63BCE9;
background-color: #62A92F;
color: white;
display: none;
}

#preloader-message {
padding: 10px;
}
Binary file added mkdocs/docs/playground/images/liveshare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 15 additions & 3 deletions mkdocs/docs/playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,31 @@
</head>

<body class="h-100" onresize="fit()" onload="fit();updateGutterVisibility();">
<div id="preloader"><img src="images/preloader.gif" width="100px"></div>
<div id="preloader"><img src="images/preloader.gif" width="100px"><div id="preloader-message"></div></div>
<div id="navview" data-role="navview" style="display:none">
<div class="navview-pane">
<button class="pull-button">
<span class="default-icon-menu" id="toggleNavViewPane"></span>
</button>
<ul class="navview-menu">
<li class="item-header">Epsilon Playground</li>
<li class="item-header">Epsilon Playground
<span class="badges" style="display:none;float:right;position:relative;top:-2px" id="liveShareTitleBadges">
<span class="badge inline" style="font-size:12px; background-color:#41A030;color:white">LIVE</span>
</span>
</li>
<li class="item-separator"></li>
<li class="item-separator" id="examplesEnd"></li>
<li>
<a href="#" onclick="showLiveShare(event)" id="liveShare">
<span class="icon"><span class="mif-example-16 mif-liveshare"></span></span>
<span class="caption">Live Share</span>
<div class="badges" id="liveShareBadges" style="display:none">
<div class="badge inline" style="background-color:#41A030;color:white">ON</div>
</div>
</a>
<a href="#" onclick="copyShortenedLink(event)" id="copyShortened">
<span class="icon"><span class="mif-example-16 mif-link"></span></span>
<span class="caption">Share</span>
<span class="caption">Share Snapshot</span>
</a>
<a href="#" onclick="showDownloadOptions(event)" id="showDownloadOptions">
<span class="icon"><span class="mif-example-16 mif-download"></span></span>
Expand All @@ -42,6 +53,7 @@
</li>
</ul>
</div>

<div class="navview-content" id="navview-content"/>
</div>

Expand Down
8 changes: 8 additions & 0 deletions mkdocs/docs/playground/js/Backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ class Backend {
getShortURLService() {
return this.services["ShortURLFunction"];
}

getYjsService() {
return this.services["Yjs"];
}

getKrokiService() {
return this.services["Kroki"];
}
}

export { Backend };
Loading
Loading