Skip to content

Commit

Permalink
Remove node-scss, add recommender overlay
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Wang <jay@zijie.wang>
  • Loading branch information
xiaohk committed Oct 3, 2023
1 parent b38af49 commit 2720f0c
Show file tree
Hide file tree
Showing 21 changed files with 50 additions and 39 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@
"dependencies": {
"as-console": "^5.0.3",
"d3": "^6.7.0",
"node-sass": "^6.0.0",
"sass": "^1.32.13",
"sirv-cli": "^1.0.0",
"svelte-preprocess": "^4.7.3"
"svelte-preprocess": "^5.0.4"
}
}
14 changes: 13 additions & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.1/css/bulma.min.css"
integrity="sha512-ZRv40llEogRmoWgZwnsqke3HNzJ0kiI0+pcMgiz2bxO6Ew1DVBtWjVn0qjrXdT3+u+pSN36gLgmJiiQ3cQtyzA=="
crossorigin="anonymous" />

<script
type="module"
src="https://unpkg.com/recommender-overlay/dist/recommender-overlay.es.js"
></script>
</svelte:head>

<script>
Expand All @@ -10,7 +15,7 @@
// import Article from './ArticleAnon.svelte';
</script>

<style type='text/scss'>
<style lang='scss'>
.stand-alone-page {
color: #333;
box-sizing: border-box;
Expand All @@ -30,5 +35,12 @@

<div class='stand-alone-page'>
<!-- <Main /> -->
<recommender-overlay
my-brand="GAM Changer"
recommended-brands="GAM Coach, WebSHAP, TimberTrek, StickyLand"
position-left="20"
display-delay="30000"
homepage-url=""
/>
<Article />
</div>
2 changes: 1 addition & 1 deletion src/Article.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import 'define';
@import 'article';
Expand Down
6 changes: 3 additions & 3 deletions src/ArticleAnon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import 'define';
@import 'article';
.page {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -649,7 +649,7 @@
<div class='footer-main'>
Thanks for reviewing GAM Changer!
</div>

</div>

</div>
2 changes: 1 addition & 1 deletion src/GAM.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import 'define';
Expand Down
2 changes: 1 addition & 1 deletion src/Header.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
</script>

<style type='text/scss'>
<style lang='scss'>
@import 'define';
#header {
Expand Down
6 changes: 3 additions & 3 deletions src/Main.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import 'define';
.main-standalone {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -56,6 +56,6 @@
<GAM />

</div>


</div>
4 changes: 2 additions & 2 deletions src/NotebookWidget.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ onMount(() => {
</script>

<style type='text/scss'>
<style lang='scss'>
@import 'define';
.stand-alone-page {
Expand Down Expand Up @@ -173,7 +173,7 @@ onMount(() => {
<div class='stand-alone-page' bind:this={component}>
<div class='page'>
<Tooltip bind:this={tooltip}/>

<div class='gam-changer'>
<div class='widget-wrapper'>
<div class='notebook-header'>
Expand Down
10 changes: 5 additions & 5 deletions src/components/ContextMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
componentSelect.select('.items')
.style('overflow', 'visible');
componentSelect.select(`.sub-item-${option}`)
.classed('hidden', false);
}, delay);
Expand All @@ -276,7 +276,7 @@
componentSelect.select('.items')
.style('overflow', 'hidden');
componentSelect.select(`.sub-item-${option}`)
.classed('hidden', true);
};
Expand Down Expand Up @@ -348,7 +348,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
$secondary-color: hsl(0, 0%, 40%);
Expand Down Expand Up @@ -556,7 +556,7 @@
&.selected {
border: 2px solid change-color($blue-reg, $lightness: 70%);
.sub-item-child .svg-icon {
color: $blue-reg;
Expand Down Expand Up @@ -681,7 +681,7 @@
on:mouseleave={mouseleaveHandler}
>
<div class='svg-icon icon-increasing'></div>

<div class='sub-item sub-item-increasing hidden'>
<!-- Check button -->
<div class='item sub-item-child show-tooltip' on:click={subItemCheckClicked}
Expand Down
6 changes: 3 additions & 3 deletions src/components/Dropzone.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
const readJSON = (file) => {
return new Promise((resolve, reject) => {
let fr = new FileReader();
let fr = new FileReader();
fr.onload = () => {
resolve(JSON.parse(fr.result));
};
Expand Down Expand Up @@ -174,7 +174,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
Expand Down Expand Up @@ -269,7 +269,7 @@
{:else}
<div class='svg-icon icon-two'></div>
{/if}

<div class='drop-message'>
{#if dataType === 'modelData'}
Drop a <u>model file</u> (.json) or a <u>GAM Changer document</u> (.gamchanger) here to start
Expand Down
4 changes: 2 additions & 2 deletions src/components/ToggleSwitch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
$secondary-color: hsl(0, 0%, 40%);
Expand All @@ -111,7 +111,7 @@
.toggle {
display: none;
&:checked + .toggle-button .dot {
left: 50%;
}
Expand Down
2 changes: 1 addition & 1 deletion src/global-explanation/CatFeature.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
@import './common.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/global-explanation/ContFeature.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
@import './common.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/global-explanation/InterCatCatFeature.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
@import './common.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/global-explanation/InterContCatFeature.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
@import './common.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/global-explanation/InterContContFeature.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
@import './common.scss';
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar/ClassificationMetrics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
Expand Down
8 changes: 4 additions & 4 deletions src/sidebar/Feature.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$: curTabHeight = tabHeights[selectedTab];
let featureInitialized = false;
let waitingToDrawDIV = false;
let height = 0;
const svgHeight = 40;
Expand All @@ -37,7 +37,7 @@
let instance = d3.select(component)
.select('.feature-list')
.node();
let scrollBarWidth = instance.offsetWidth - instance.clientWidth;
console.log(`effect tab: [${width}, ${height}, ${scrollBarWidth}]`);
Expand Down Expand Up @@ -129,7 +129,7 @@
} else {
sortedCatFeatures = tempSortedCatFeatures;
}
sidebarInfo.curGroup = '';
sidebarStore.set(sidebarInfo);
}
Expand All @@ -138,7 +138,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
Expand Down
4 changes: 2 additions & 2 deletions src/sidebar/History.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { quadInOut, expoInOut, cubicInOut } from 'svelte/easing';
import { round, shuffle } from '../utils/utils';
import { bindInlineSVG } from '../utils/svg-icon-binding';
export let sidebarStore;
export let historyStore;
export let ebm;
Expand Down Expand Up @@ -202,7 +202,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
Expand Down
2 changes: 1 addition & 1 deletion src/sidebar/RegressionMetrics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
Expand Down
4 changes: 2 additions & 2 deletions src/sidebar/Sidebar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</script>

<style type='text/scss'>
<style lang='scss'>
@import '../define';
Expand Down Expand Up @@ -170,7 +170,7 @@
<div class='tab' class:hidden={sidebarInfo.selectedTab !== 'history'}>
<History sidebarStore={sidebarStore} historyStore={historyStore} ebm={ebm}/>
</div>

</div>

</div>

0 comments on commit 2720f0c

Please sign in to comment.