diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 018ee5e7..b0ecb717 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -7,8 +7,27 @@ on: branches: [ main ] jobs: + commit-lint: + name: 'Semantic Commits' + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 200 + - uses: actions/setup-node@v4 + with: + node-version: 20 + check-latest: true + + - name: Check commit titles + run: | + npm install @commitlint/cli @commitlint/config-conventional + npx commitlint --verbose --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} + linters: - name: Semantic Commits + name: Semgrep Rules runs-on: ubuntu-latest if: github.event_name == 'pull_request' @@ -20,8 +39,17 @@ jobs: with: python-version: '3.10' + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/*requirements.txt', '**/pyproject.toml', '**/setup.py') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}- + - name: Install and Run Pre-commit - uses: pre-commit/action@v2.0.3 + uses: pre-commit/action@v3.0.1 - name: Download Semgrep rules run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index da26c807..5338837c 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -70,7 +70,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} @@ -79,7 +79,7 @@ jobs: ${{ runner.os }}-yarn-ui- - name: Cache cypress binary - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/Cypress key: ${{ runner.os }}-cypress diff --git a/commitlint.config.js b/commitlint.config.js new file mode 100644 index 00000000..0c582f54 --- /dev/null +++ b/commitlint.config.js @@ -0,0 +1,26 @@ +module.exports = { + parserPreset: "conventional-changelog-conventionalcommits", + rules: { + "subject-empty": [2, "never"], + "type-case": [2, "always", "lower-case"], + "type-empty": [2, "never"], + "type-enum": [ + 2, + "always", + [ + "build", + "chore", + "ci", + "docs", + "feat", + "fix", + "perf", + "refactor", + "revert", + "style", + "test", + "deprecate", // deprecation decision + ], + ], + }, +}; diff --git a/frontend/index.html b/frontend/index.html index 86a3dece..8150b401 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -2,9 +2,9 @@ - + - Frappe Learning + {{ title }} @@ -23,17 +23,6 @@

{{ meta.description }}

-

- The content here is just for seo purposes. The actual content will be loaded in a few seconds. -

-

- Seo checks if a page has more than 300 words. So, here are some more words to make it more than 300 words. - Page descriptions are the HTML meta tags that provide a brief summary of a web page. - Search engines use meta descriptions to help identify the page's topic - they don't use them to rank the page, but they do use them to determine whether or not to display the page in search results. - Meta descriptions are important because they're often the first thing people see when they're deciding which search result to click on. - They're also important because they can help improve your click-through rate (CTR) from search results. - A good meta description can entice people to click on your page instead of someone else's. -

Know More @@ -41,9 +30,8 @@
diff --git a/frontend/public/learning.svg b/frontend/public/learning.svg new file mode 100644 index 00000000..49fb3d80 --- /dev/null +++ b/frontend/public/learning.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/components/Controls/CodeEditor.vue b/frontend/src/components/Controls/CodeEditor.vue index cbb10b83..32ae86ed 100644 --- a/frontend/src/components/Controls/CodeEditor.vue +++ b/frontend/src/components/Controls/CodeEditor.vue @@ -146,7 +146,6 @@ function resetEditor(value: string, resetHistory = false) { value = getModelValue() aceEditor?.setValue(value) aceEditor?.clearSelection() - console.log(isDark.value) aceEditor?.setTheme(isDark.value ? 'ace/theme/twilight' : 'ace/theme/chrome') props.autofocus && aceEditor?.focus() if (resetHistory) { diff --git a/frontend/src/components/CourseOutline.vue b/frontend/src/components/CourseOutline.vue index 122e76e7..3bff9484 100644 --- a/frontend/src/components/CourseOutline.vue +++ b/frontend/src/components/CourseOutline.vue @@ -142,6 +142,7 @@ - - - - - - - diff --git a/frontend/src/components/JobCard.vue b/frontend/src/components/JobCard.vue index ca75182b..51b84b95 100644 --- a/frontend/src/components/JobCard.vue +++ b/frontend/src/components/JobCard.vue @@ -1,41 +1,37 @@ diff --git a/frontend/src/pages/AssignmentSubmission.vue b/frontend/src/pages/AssignmentSubmission.vue index c6fb1c48..1d2b747e 100644 --- a/frontend/src/pages/AssignmentSubmission.vue +++ b/frontend/src/pages/AssignmentSubmission.vue @@ -14,12 +14,14 @@ diff --git a/frontend/src/pages/AssignmentSubmissionList.vue b/frontend/src/pages/AssignmentSubmissionList.vue index cdb68778..2e09835a 100644 --- a/frontend/src/pages/AssignmentSubmissionList.vue +++ b/frontend/src/pages/AssignmentSubmissionList.vue @@ -84,14 +84,17 @@ import { ListRows, ListRow, ListRowItem, + usePageMeta, } from 'frappe-ui' import { computed, inject, onMounted, ref, watch } from 'vue' import { useRouter } from 'vue-router' import { Pencil } from 'lucide-vue-next' +import { sessionStore } from '../stores/session' import Link from '@/components/Controls/Link.vue' const user = inject('$user') const dayjs = inject('$dayjs') +const { brand } = sessionStore() const router = useRouter() const assignmentID = ref('') const member = ref('') @@ -214,4 +217,11 @@ const breadcrumbs = computed(() => { }, ] }) + +usePageMeta(() => { + return { + title: __('Assignment Submissions'), + icon: brand.favicon, + } +}) diff --git a/frontend/src/pages/Assignments.vue b/frontend/src/pages/Assignments.vue index 3f2e1744..939c1b5d 100644 --- a/frontend/src/pages/Assignments.vue +++ b/frontend/src/pages/Assignments.vue @@ -80,15 +80,18 @@ import { createListResource, FormControl, ListView, + usePageMeta, } from 'frappe-ui' import { computed, inject, onMounted, ref, watch } from 'vue' import { Plus, Pencil } from 'lucide-vue-next' import { useRouter } from 'vue-router' +import { sessionStore } from '../stores/session' const user = inject('$user') const dayjs = inject('$dayjs') const titleFilter = ref('') const typeFilter = ref('') +const { brand } = sessionStore() const router = useRouter() onMounted(() => { @@ -184,4 +187,11 @@ const breadcrumbs = computed(() => [ route: { name: 'Assignments' }, }, ]) + +usePageMeta(() => { + return { + title: __('Assignments'), + icon: brand.favicon, + } +}) diff --git a/frontend/src/pages/Badge.vue b/frontend/src/pages/Badge.vue index 976104a8..a20fbe5f 100644 --- a/frontend/src/pages/Badge.vue +++ b/frontend/src/pages/Badge.vue @@ -24,10 +24,12 @@ diff --git a/frontend/src/pages/Batch.vue b/frontend/src/pages/Batch.vue index eec3c417..c9cf5054 100644 --- a/frontend/src/pages/Batch.vue +++ b/frontend/src/pages/Batch.vue @@ -199,9 +199,14 @@ diff --git a/frontend/src/pages/BatchDetail.vue b/frontend/src/pages/BatchDetail.vue index 24d243ec..4ccd4c33 100644 --- a/frontend/src/pages/BatchDetail.vue +++ b/frontend/src/pages/BatchDetail.vue @@ -102,8 +102,9 @@ import { computed, inject } from 'vue' import { useRouter } from 'vue-router' import { BookOpen, Clock } from 'lucide-vue-next' -import { formatTime, updateDocumentTitle } from '@/utils' -import { Breadcrumbs, createResource } from 'frappe-ui' +import { formatTime } from '@/utils' +import { Breadcrumbs, createResource, usePageMeta } from 'frappe-ui' +import { sessionStore } from '@/stores/session' import CourseCard from '@/components/CourseCard.vue' import BatchOverlay from '@/components/BatchOverlay.vue' import DateRange from '../components/Common/DateRange.vue' @@ -112,6 +113,7 @@ import UserAvatar from '@/components/UserAvatar.vue' const user = inject('$user') const router = useRouter() +const { brand } = sessionStore() const props = defineProps({ batchName: { @@ -152,14 +154,12 @@ const breadcrumbs = computed(() => { return items }) -const pageMeta = computed(() => { +usePageMeta(() => { return { - title: batch.data?.title, - description: batch.data?.description, + title: batch?.data?.title, + icon: brand.favicon, } }) - -updateDocumentTitle(pageMeta)