Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,12 @@ module.exports = {
singleQuote: false,
},
},
{
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
options: {
singleQuote: true,
templateSingleQuote: false,
},
},
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@highlightedFile={{highlightedFile}}
@onPublishToGithubButtonClick={{this.handlePublishToGithubButtonClick}}
@solution={{@solution}}
class={{if (not-eq index (sub @solution.highlightedFiles.length 1)) "mb-4"}}
class={{if (not-eq index (sub (or @solution.highlightedFiles.length 0) 1)) "mb-4"}}
/>
{{/each}}
{{else}}
Expand Down
50 changes: 25 additions & 25 deletions app/components/roadmap-page/course-idea-card.gts
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,31 @@ export default class CourseIdeaCard extends Component<Signature> {

<template>
<div
class='group bg-white dark:bg-gray-925 p-5 rounded-md shadow-xs border
{{if this.userHasVoted "border-gray-300 dark:border-gray-700" "border-gray-200 dark:border-white/5"}}
class="group bg-white dark:bg-gray-925 p-5 rounded-md shadow-xs border
{{if this.userHasVoted 'border-gray-300 dark:border-gray-700' 'border-gray-200 dark:border-white/5'}}
relative
{{if @courseIdea.developmentStatusIsReleased "opacity-50"}}'
{{if @courseIdea.developmentStatusIsReleased 'opacity-50'}}"
data-test-course-idea-card
>
<div class='flex items-start gap-3'>
<div class='flex flex-col gap-1 grow'>
<div class='flex items-center gap-2 flex-wrap mt-0.5 mb-2.5'>
<div class='text-gray-700 dark:text-gray-200 font-bold text-xl tracking-tight' data-test-course-idea-name>
<div class="flex items-start gap-3">
<div class="flex flex-col gap-1 grow">
<div class="flex items-center gap-2 flex-wrap mt-0.5 mb-2.5">
<div class="text-gray-700 dark:text-gray-200 font-bold text-xl tracking-tight" data-test-course-idea-name>
{{@courseIdea.name}}
</div>

{{#if @courseIdea.developmentStatusIsReleased}}
<Pill @color='blue' data-test-development-status-pill>
<div class='flex items-center gap-1'>
{{svgJar 'check-circle' class='w-3 fill-current'}}
<Pill @color="blue" data-test-development-status-pill>
<div class="flex items-center gap-1">
{{svgJar "check-circle" class="w-3 fill-current"}}
Released
</div>
<EmberTooltip @text='This challenge is now available! Visit the catalog to try it out.' />
<EmberTooltip @text="This challenge is now available! Visit the catalog to try it out." />
</Pill>
{{else if @courseIdea.developmentStatusIsInProgress}}
<Pill @color='yellow' data-test-development-status-pill>
<div class='flex items-center gap-1'>
{{svgJar 'shield-check' class='w-3 fill-current'}}
<Pill @color="yellow" data-test-development-status-pill>
<div class="flex items-center gap-1">
{{svgJar "shield-check" class="w-3 fill-current"}}
In Progress
</div>

Expand All @@ -108,32 +108,32 @@ export default class CourseIdeaCard extends Component<Signature> {
{{/if}}
</Pill>
{{else if this.userHasVoted}}
<Pill @color='green' data-test-development-status-pill>
<div class='flex items-center gap-1'>
{{svgJar 'thumb-up' class='w-3 fill-current'}}
<Pill @color="green" data-test-development-status-pill>
<div class="flex items-center gap-1">
{{svgJar "thumb-up" class="w-3 fill-current"}}
Voted
</div>
<EmberTooltip @text="You've voted for this idea! We'll notify you when it launches." />
</Pill>
{{else if @courseIdea.isNewlyCreated}}
<Pill @color='green' data-test-development-status-pill>
<Pill @color="green" data-test-development-status-pill>
New
<EmberTooltip @text='This is a recently added idea! Vote to help us decide which ideas to prioritize.' />
<EmberTooltip @text="This is a recently added idea! Vote to help us decide which ideas to prioritize." />
</Pill>
{{/if}}
</div>
<div class='prose dark:prose-invert prose-sm'>
<div class="prose dark:prose-invert prose-sm">
{{MarkdownToHtml @courseIdea.descriptionMarkdown}}
</div>
</div>

<div class='flex flex-col gap-2 items-end shrink-0'>
<VoteButton @idea={{@courseIdea}} @userHasVoted={{this.userHasVoted}} {{on 'click' this.handleVoteButtonClick}} />
<div class="flex flex-col gap-2 items-end shrink-0">
<VoteButton @idea={{@courseIdea}} @userHasVoted={{this.userHasVoted}} {{on "click" this.handleVoteButtonClick}} />

<div class='flex items-center gap-1'>
<div class='{{if this.userHasVoted "text-teal-600 dark:text-teal-400" "text-gray-400 dark:text-gray-500"}} text-xs' data-test-vote-count>
<div class="flex items-center gap-1">
<div class="{{if this.userHasVoted 'text-teal-600 dark:text-teal-400' 'text-gray-400 dark:text-gray-500'}} text-xs" data-test-vote-count>
{{@courseIdea.votesCount}}
{{if (eq @courseIdea.votesCount 1) 'vote' 'votes'}}
{{if (eq @courseIdea.votesCount 1) "vote" "votes"}}
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions app/components/roadmap-page/idea-card/unvote-button.gts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ type Signature = {
export default class UnvoteButton extends Component<Signature> {
<template>
<button
type='button'
class='flex items-center text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 px-2 hover:underline'
type="button"
class="flex items-center text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 px-2 hover:underline"
data-test-unvote-button
...attributes
>
<span class='text-xs'>
<span class="text-xs">
Cancel
</span>
</button>
Expand Down
16 changes: 8 additions & 8 deletions app/components/roadmap-page/idea-card/vote-button.gts
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,25 @@ export default class VoteButton extends Component<Signature> {

<template>
<button
type='button'
class='px-1.5 py-1 rounded-sm shadow-xs flex items-center border bg-white dark:bg-gray-950
{{if @userHasVoted "border-teal-500" "border-gray-300 dark:border-gray-700"}}
transition-all duration-75 group/vote-button'
type="button"
class="px-1.5 py-1 rounded-sm shadow-xs flex items-center border bg-white dark:bg-gray-950
{{if @userHasVoted 'border-teal-500' 'border-gray-300 dark:border-gray-700'}}
transition-all duration-75 group/vote-button"
data-test-vote-button
...attributes
>
<span
class={{if
@userHasVoted
'text-teal-500 group-hover/vote-button:text-teal-600'
'text-gray-400 dark:text-gray-500 group-hover/vote-button:text-gray-500 dark:group-hover/vote-button:text-gray-400'
"text-teal-500 group-hover/vote-button:text-teal-600"
"text-gray-400 dark:text-gray-500 group-hover/vote-button:text-gray-500 dark:group-hover/vote-button:text-gray-400"
}}
>
{{svgJar 'thumb-up' class='w-5 fill-current'}}
{{svgJar "thumb-up" class="w-5 fill-current"}}
</span>

{{#if this.authenticator.isAnonymous}}
<EmberTooltip @text='Click to login via GitHub' />
<EmberTooltip @text="Click to login via GitHub" />
{{/if}}
</button>
</template>
Expand Down
10 changes: 5 additions & 5 deletions app/components/roadmap-page/submit-course-idea-card.gts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ export default class SubmitCourseIdeaCard extends Component {

<template>
<div
class='group border-2 border-gray-200 border-dashed dark:border-white/5 hover:border-gray-400 dark:hover:border-gray-700 px-5 py-10 lg:py-20 rounded-md flex flex-col items-center justify-center text-gray-400 dark:text-gray-600 hover:text-gray-600 dark:hover:text-gray-400'
class="group border-2 border-gray-200 border-dashed dark:border-white/5 hover:border-gray-400 dark:hover:border-gray-700 px-5 py-10 lg:py-20 rounded-md flex flex-col items-center justify-center text-gray-400 dark:text-gray-600 hover:text-gray-600 dark:hover:text-gray-400"
data-test-submit-course-idea-card
role='button'
{{on 'click' this.handleClick}}
role="button"
{{on "click" this.handleClick}}
>
{{svgJar 'plus' class='w-12 h-12 fill-current'}}
{{svgJar "plus" class="w-12 h-12 fill-current"}}

<div class='mt-1 font-bold text-xl tracking-tight'>
<div class="mt-1 font-bold text-xl tracking-tight">
Submit Idea
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "5.12.0",
"version": "6.1.0",
"blueprints": [
{
"name": "app",
Expand Down
Loading