Skip to content

Commit

Permalink
Apply ember-no-implicit-this-codemod
Browse files Browse the repository at this point in the history
Apply ember-no-implicit-this-codemod. This joins a multi-line element onto a single line if it is not prettier-folded (1 arg per line), so apply prettier to these to re-fold them.  It also converts single- to double-quote, so revert those changes.

Use yapplabs version of package ember-radio-button.
Remove package ember-raf-scheduler, which is not updated for Ember v4.
utils/draw/axisBrush.js : comment out use of ember-raf-scheduler. axisScaleChangedRaf() : call fn directly instead of via scheduler.
  • Loading branch information
Don-Isdale committed Feb 22, 2024
1 parent aebbd64 commit 8aab55d
Show file tree
Hide file tree
Showing 107 changed files with 1,532 additions and 963 deletions.
4 changes: 2 additions & 2 deletions frontend/app/components/panel/selected-server.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<div class="panel panel-primary selected-server">
<span
class="apiServer"
style={{borderStyle}} >
{{apiServer.tabText}}
style={{this.borderStyle}} >
{{this.apiServer.tabText}}
</span>
</div>

Expand Down
2 changes: 1 addition & 1 deletion frontend/app/templates/access-request.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#form/auth-base title="Verified" errorMessage=errorMessage}}
{{#form/auth-base title="Verified" errorMessage=this.errorMessage}}

Thank you for confirming your email. An access request will now be sent to the administrator. Once your access is confirmed, you will receive an email notification.
<br>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/templates/admin-verified.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#form/auth-base title="Access Granted" errorMessage=errorMessage}}
{{#form/auth-base title="Access Granted" errorMessage=this.errorMessage}}

You have verified the user. The user may now log in.
<br>
Expand Down
2 changes: 1 addition & 1 deletion frontend/app/templates/components/app-header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<ul class="nav navbar-right">
<li>
<a href='https://github.com/plantinformatics/pretzel/' target='_blank'>
v{{version }} released {{buildDateFormatted}} View on GitHub
v{{this.version }} released {{this.buildDateFormatted}} View on GitHub
</a>
</li>
{{#if this.auth}}
Expand Down
61 changes: 40 additions & 21 deletions frontend/app/templates/components/axis-2d.hbs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{!-- axis-2d is used within a <foreignObject> within a g.axis, created by axisShowExtend()
It is rendered into div#axis2D (will add axisID) using ember-wormhole.
--}}
{{#if axis1d.extended}}
{{#if this.axis1d.extended}}

{{#if 0}}
{{#ember-wormhole to=targetEltId }}
{{#ember-wormhole to=this.targetEltId }}
<div class="resizer inFO" style="float:right;">
{{!-- Being within <foreignObject>, this alternative is used to create and position the resizer arrow;
Because content is not displayed when position: relative; set via .resizer:not(.inFO)::after.
Expand All @@ -19,7 +19,7 @@
<div class="menuHead">
&#x21F9;&nbsp;&#x21F9;
</div>
{{#if urlOptions.splitAxes }}
{{#if this.urlOptions.splitAxes }}
<div class="subMenu">
<button {{action "addTracks"}}>&#x2225;</button>
<button {{action "addChart"}}>&#x2630;</button>
Expand All @@ -30,7 +30,7 @@
</div>

<div class="accordion-div">
{{component "axis-accordion" subComponents=subComponents data=data tableData=tableData axis=this}}
{{component "axis-accordion" subComponents=this.subComponents data=this.data tableData=this.tableData axis=this}}
</div>


Expand All @@ -39,27 +39,46 @@

{{/if}}

{{positionRightEdgeEffect}}
<div>axis-2d : {{axisID}}, {{targetEltId}}, {{subComponents.length}} :
{{this.positionRightEdgeEffect}}
<div>axis-2d : {{this.axisID}}, {{this.targetEltId}}, {{this.subComponents.length}} :
<div>subComponents :
{{#draw/axis-blocks axis1d=axis1d dataBlocks=dataBlocks
childWidths=childWidths.centre trackWidth=trackWidth
as |axisBlocks| }}
{{axis-charts data=data axis=this axisID=axisID childWidths=childWidths.centre
allocatedWidths=allocatedWidths blocks=viewedChartable
resizeEffect=resizeEffect axisBlocks=axisBlocks
trackWidth=trackWidth
{{#draw/axis-blocks
axis1d=this.axis1d
dataBlocks=this.dataBlocks
childWidths=this.childWidths.centre
trackWidth=this.trackWidth
as |axisBlocks|
}}
{{axis-charts
data=this.data
axis=this
axisID=this.axisID
childWidths=this.childWidths.centre
allocatedWidths=this.allocatedWidths
blocks=this.viewedChartable
resizeEffect=this.resizeEffect
axisBlocks=axisBlocks
trackWidth=this.trackWidth
}}
{{log 'blockService' blockService 'viewedChartable' blockService.viewedChartable}}
{{axis-tracks axis=this axisID=axisID childWidths=childWidths
allocatedWidths=allocatedWidths trackBlocksR=trackBlocks
resizeEffect=resizeEffect axisBlocks=axisBlocks
trackWidth=trackWidth
model=model
{{log
'blockService'
this.blockService
'viewedChartable'
this.blockService.viewedChartable
}}
{{axis-tracks
axis=this
axisID=this.axisID
childWidths=this.childWidths
allocatedWidths=this.allocatedWidths
trackBlocksR=this.trackBlocks
resizeEffect=this.resizeEffect
axisBlocks=axisBlocks
trackWidth=this.trackWidth
model=this.model
}}
{{/draw/axis-blocks}}

{{#each subComponents as |subComponent|}}
{{#each this.subComponents as |subComponent|}}
{{subComponent}}
{{/each}}
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/app/templates/components/axis-accordion.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{{#each subComponents as |subComponent|}}
{{component subComponent data=data tableData=tableData axis=axis}}
{{#each this.subComponents as |subComponent|}}
{{component subComponent data=this.data tableData=this.tableData axis=this.axis}}
{{/each}}
20 changes: 10 additions & 10 deletions frontend/app/templates/components/axis-charts.hbs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<span id='axis-charts-span'>Axis-Charts</span>
{{#each blockViews as |chartBlock|}}
{{draw/block-view axis=axis axisID=axisID block=chartBlock blocksData=blocksData}}
{{#each this.blockViews as |chartBlock|}}
{{draw/block-view axis=this.axis axisID=this.axisID block=chartBlock blocksData=this.blocksData}}
{{/each}}

{{#if blocks}}
Blocks {{blocks.length}} {{chartsArray.length}}
{{#each chartsArray as |chart|}}
{{axis-chart axis=axis axisID=axisID blocks=blocks blocksData=blocksData axisCharts=this chart=chart }}
{{#if this.blocks}}
Blocks {{this.blocks.length}} {{this.chartsArray.length}}
{{#each this.chartsArray as |chart|}}
{{axis-chart axis=this.axis axisID=this.axisID blocks=this.blocks blocksData=this.blocksData axisCharts=this chart=chart }}
{{/each}}
{{ resizeEffectHere }}
{{ drawContentEffect }}
{{ this.resizeEffectHere }}
{{ this.drawContentEffect }}

{{else}}
<div class="Chart">
{{content-editable
value=selection
value=this.selection
placeholder="Paste Chart Here"
class="chart pasteData"
type="text"}}

</div>
{{/if}}
{{toggleChartTypeEffect}}
{{this.toggleChartTypeEffect}}
11 changes: 8 additions & 3 deletions frontend/app/templates/components/axis-table.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@

{{#data-table data=tableData selectionMode='multiple'
selectionChanged=(action 'selectionChanged') classNames=tableClassNames as |t|}}
{{#data-table
data=this.tableData
selectionMode='multiple'
selectionChanged=(action "selectionChanged")
classNames=this.tableClassNames
as |t|
}}
{{t.selectionColumn}}
{{t.column propertyName='feature' name='Feature'}}
{{t.column propertyName='position' name='Position'}}
{{/data-table}}
{{/data-table}}
21 changes: 13 additions & 8 deletions frontend/app/templates/components/axis-tracks.hbs
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
{{!-- This is within div.devel-visible --}}
{{resizeEffectHere}}
{{flippedEffect}}
{{slowDependenciesEffect}}
{{this.resizeEffectHere}}
{{this.flippedEffect}}
{{this.slowDependenciesEffect}}
<div class="axis-tracks">
layoutWidth : {{!-- layoutWidthEffect --}}
showTrackBlocks : {{showTrackBlocks}}
showTrackBlocks : {{this.showTrackBlocks}}
</div>

{{#unless trackBlocks}}
{{#unless this.trackBlocks}}
<div class="Tracks">
{{content-editable
value=selection
value=this.selection
placeholder="Paste Tracks Here"
escape-press="putContent"
class="tracks pasteData"
type="text"}}

{{#data-table data=data.tracks selectionMode='multiple'
selectionChanged=(action 'selectionChanged') classNames=tableClassNames as |t|}}
{{#data-table
data=this.data.tracks
selectionMode='multiple'
selectionChanged=(action 'selectionChanged')
classNames=this.tableClassNames
as |t|
}}
{{t.selectionColumn}}
{{t.column propertyName='start' name='Start'}}
{{t.column propertyName='end' name='End'}}
Expand Down
10 changes: 5 additions & 5 deletions frontend/app/templates/components/contain-change.hbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<span>pinned {{ pinned }} (contain-change outside)</span>
{{#ember-wormhole to=targetId renderInPlace=pinned }}
<span>pinned {{ this.pinned }} (contain-change outside)</span>
{{#ember-wormhole to=this.targetId renderInPlace=this.pinned }}
<span class="pathHover">
<button {{action "pinToolTip"}}>{{elem/icon-base name="pause"}}</button>
<button {{action "extendToolTip"}}>&#x21F2;</button>
<span>extended : {{ extended }}</span>
<span>extended : {{ this.extended }}</span>
<div class="toolTipChild" id="toolTipChild">
{{#if extended}} {{!-- pathHoveredVar --}}
{{#if this.extended}} {{!-- pathHoveredVar --}}
<span>path-hover goes here</span>
{{path-hover drawMap data features=hoverFeatures}}
{{path-hover this.drawMap this.data features=this.hoverFeatures}}
{{/if}}
</div>
</span>
Expand Down
58 changes: 34 additions & 24 deletions frontend/app/templates/components/draw-map.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{queryParamsService.urlOptionsEffect}}
{{this.queryParamsService.urlOptionsEffect}}

{{!-- <div class="resizer" style="float:right;">
</div> The resizer in mapview adjacent this works so this is probably not needed. --}}
Expand All @@ -7,7 +7,7 @@
<!--<ul>
<li>{{selectedMapset.name}}</li>
</ul> -->
<div id="headsUp">{{headsUp.tipText}}</div>
<div id="headsUp">{{this.headsUp.tipText}}</div>


<div id="popoverTarget" style="float:right"></div>
Expand All @@ -16,50 +16,60 @@
{{yield}}

<div class="devel-visible">
{{draw/graph-frame oa=oa drawMap=this drawMap=this
controls=controls
componentGeometry=componentGeometry
{{draw/graph-frame
oa=this.oa
drawMap=this
drawMap=this
controls=this.controls
componentGeometry=this.componentGeometry
data=this.data
panelLayout=panelLayout
panelLayout=this.panelLayout
}}
{{draw/stacks-view stacksOld=oa.stacks oa=oa drawMap=this axes2d=axes2d
model=model
featuresInBlocks=featuresInBlocks
{{draw/stacks-view
stacksOld=this.oa.stacks
oa=this.oa
drawMap=this
axes2d=this.axes2d
model=this.model
featuresInBlocks=this.featuresInBlocks
}}
{{!-- This info will be thinned or removed as axes development progresses. --}}

{{!-- wait until targetId="toolTip" will resolve --}}
{{#if toolTipCreated }}
{{#if this.toolTipCreated }}
{{!-- 2nd line of args passed are through to path-hover --}}
{{contain-change targetId="toolTip" closeToolTip=(action "closeToolTipA")
drawMap=this data=oa
{{contain-change
targetId="toolTip"
closeToolTip=(action "closeToolTipA")
drawMap=this
data=this.oa
}}
{{/if}}
<div>paths : {{paths.length}}</div>
<div>paths : {{this.paths.length}}</div>
</div>
{{draw/link-path stackEvents=this pathReceiver=this modelParamOptions=params.options}}
{{draw/link-path stackEvents=this pathReceiver=this modelParamOptions=this.params.options}}

<div class="devel-visible">
<div>brushedAxes : {{flowsService.axisBrush.brushedAxes.length}}</div>
<div>brushedAxes : {{this.flowsService.axisBrush.brushedAxes.length}}</div>

<div>{{blockService.viewedIds.length}}, blockAdjs : {{flowsService.blockAdjIds.length}} {{flowsService.blockAdjsCP.length}}</div>
<div>{{this.blockService.viewedIds.length}}, blockAdjs : {{this.flowsService.blockAdjIds.length}} {{this.flowsService.blockAdjsCP.length}}</div>
<div>
{{#each flowsService.blockAdjs as |blockAdj| }}
{{draw/block-adj blockAdj=blockAdj drawMap=this xOffsets=xOffsets }}
{{#each this.flowsService.blockAdjs as |blockAdj| }}
{{draw/block-adj blockAdj=blockAdj drawMap=this xOffsets=this.xOffsets }}
{{/each}}
</div>
</div>

{{#if axisFeatureCircleHover}}
{{path-hover data=oa features=hoverFeatures }} {{!-- targetId=axisFeatureTargetId "holder" --}}
{{#if this.axisFeatureCircleHover}}
{{path-hover data=this.oa features=this.hoverFeatures }} {{!-- targetId=axisFeatureTargetId "holder" --}}
{{/if}}
{{#if urlOptions.hoverFeatures}}
{{#if this.urlOptions.hoverFeatures}}
<div class="hoverFeatures">
<span>Hovered Features</span>
{{#each hoverFeatures as |feature|}}
{{#each this.hoverFeatures as |feature|}}
<div>
{{feature-name data=oa feature=feature}}
{{#each (maps-of-feature oa feature) as |map|}}
{{feature-name data=this.oa feature=feature}}
{{#each (maps-of-feature this.oa feature) as |map|}}
{{ map.name }}
{{/each}}
</div>
Expand Down
Loading

0 comments on commit 8aab55d

Please sign in to comment.