Skip to content

Commit

Permalink
course/session objs now output as <ul> again
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelchadwick committed Nov 26, 2024
1 parent 65daaee commit aa94006
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@onExpandAll={{@onExpandAllFadeText}}
as |displayText expand collapse updateTextDims shouldFade expanded|
>
<ul>
{{#if @editable}}
<span data-test-parent>
<button type="button" class="link-button" {{on "click" @manage}} data-test-manage>
Expand All @@ -57,6 +58,7 @@
</div>
</span>
{{/if}}
</ul>
{{#if shouldFade}}
<div
class="fade-text-control"
Expand Down
5 changes: 1 addition & 4 deletions packages/ilios-common/addon/components/fade-text.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
{{else}}
<span class="fade-text" data-test-fade-text ...attributes>
<div class="display-text-wrapper{{if this.shouldFade ' faded'}}">
<div
class="display-text"
{{on-resize this.updateTextDims}}
>
<div class="display-text" {{on-resize this.updateTextDims}}>
{{this.displayText}}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/ilios-common/addon/components/fade-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default class FadeTextComponent extends Component {
}
if (typeOf(this.args.text) !== 'string') {
if (typeOf(this.args.text) === 'array') {
return this.args.text.join('<br />');
return this.args.text.map((elem) => `<li>${elem}</li>`).join('');
}
return this.args.text.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
@onExpandAll={{@onExpandAllFadeText}}
as |displayText expand collapse updateTextDims shouldFade expanded|
>
<ul>
{{#if @editable}}
<span data-test-parent>
<button type="button" class="link-button" {{on "click" @manage}} data-test-manage>
Expand All @@ -49,12 +50,15 @@
</button>
</span>
{{else}}
<div class="display-text-wrapper{{if shouldFade ' faded'}}">
<div class="display-text" {{on-resize updateTextDims}}>
{{displayText}}
<span data-test-parent>
<div class="display-text-wrapper{{if shouldFade ' faded'}}">
<div class="display-text" {{on-resize updateTextDims}}>
{{displayText}}
</div>
</div>
</div>
</span>
{{/if}}
</ul>
{{#if shouldFade}}
<div
class="fade-text-control"
Expand Down

0 comments on commit aa94006

Please sign in to comment.