Skip to content

Commit

Permalink
Fix typos and improve naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
muditchoudhary committed Dec 9, 2023
1 parent 06c305a commit 3b91bd6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions kolibri/plugins/coach/assets/src/constants/tabsConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const ReportsGroupTabs = {
ACTIVITY: 'tabActivity',
};

export const LEARNERS_TABS_ID = 'reportLearners';
export const LearnersTabs = {
export const REPORTS_LEARNERS_TABS_ID = 'coachReportsLearners';
export const ReportsLearnersTabs = {
REPORTS: 'tabReports',
ACTIVITY: 'tabActivity',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

<KPageContainer>

<ReportsLearnerHeader :enablePrint="true" :activeTabId="LearnersTabs.ACTIVITY" />
<ReportsLearnerHeader :enablePrint="true" :activeTabId="ReportsLearnersTabs.ACTIVITY" />
<KTabsPanel
:tabsId="LEARNERS_TABS_ID"
:activeTabId="LearnersTabs.ACTIVITY"
:tabsId="REPORTS_LEARNERS_TABS_ID"
:activeTabId="ReportsLearnersTabs.ACTIVITY"
>
<ActivityList
embeddedPageName="ReportsLearnerActivityPage"
Expand All @@ -29,7 +29,7 @@
import commonCoach from '../common';
import CoachAppBarPage from '../CoachAppBarPage';
import ActivityList from '../common/notifications/ActivityList';
import { LEARNERS_TABS_ID, LearnersTabs } from '../../constants/tabsConstants';
import { REPORTS_LEARNERS_TABS_ID, ReportsLearnersTabs } from '../../constants/tabsConstants';
import ReportsLearnerHeader from './ReportsLearnerHeader';
export default {
Expand All @@ -42,8 +42,8 @@
mixins: [commonCoach],
data() {
return {
LEARNERS_TABS_ID,
LearnersTabs,
REPORTS_LEARNERS_TABS_ID,
ReportsLearnersTabs,
};
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@
<HeaderTabs :enablePrint="enablePrint">
<KTabsList
ref="tabList"
:tabsId="LEARNERS_TABS_ID"
:tabsId="REPORTS_LEARNERS_TABS_ID"
:ariaLabel="$tr('reportLearners')"
:activeTabId="activeTabId"
:tabs="tabs"
@click="() => saveTabsClick(LEARNERS_TABS_ID)"
@click="() => saveTabsClick(REPORTS_LEARNERS_TABS_ID)"
/>
</HeaderTabs>
</div>
Expand All @@ -71,7 +71,7 @@
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import commonCoach from '../common';
import { LEARNERS_TABS_ID, LearnersTabs } from '../../constants/tabsConstants';
import { REPORTS_LEARNERS_TABS_ID, ReportsLearnersTabs } from '../../constants/tabsConstants';
import { useCoachTabs } from '../../composables/useCoachTabs';
export default {
Expand All @@ -97,7 +97,7 @@
},
data() {
return {
LEARNERS_TABS_ID,
REPORTS_LEARNERS_TABS_ID,
};
},
computed: {
Expand Down Expand Up @@ -136,12 +136,12 @@
tabs() {
return [
{
id: LearnersTabs.REPORTS,
id: ReportsLearnersTabs.REPORTS,
label: this.coachString('reportsLabel'),
to: this.classRoute('ReportsLearnerReportPage', {}),
},
{
id: LearnersTabs.ACTIVITY,
id: ReportsLearnersTabs.ACTIVITY,
label: this.coachString('activityLabel'),
to: this.classRoute('ReportsLearnerActivityPage', {}),
},
Expand All @@ -153,8 +153,8 @@
// that this header was re-mounted as a result
// of navigation after clicking a tab (focus shouldn't
// be manipulated programatically in other cases, e.g.
// when visiting the Plan page for the first time)
if (this.wereTabsClickedRecently(this.LEARNERS_TABS_ID)) {
// when visiting the page for the first time)
if (this.wereTabsClickedRecently(this.REPORTS_LEARNERS_TABS_ID)) {
this.$nextTick(() => {
this.$refs.tabList.focusActiveTab();
});
Expand All @@ -168,7 +168,7 @@
},
reportLearners: {
message: 'Report learners',
context: 'Labels the Reports > Learners tab for screen reander users',
context: 'Labels the Reports > Learners tab for screen reader users',
},
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

<KPageContainer>

<ReportsLearnerHeader :activeTabId="LearnersTabs.REPORTS" />
<ReportsLearnerHeader :activeTabId="ReportsLearnersTabs.REPORTS" />
<KTabsPanel
:tabsId="LEARNERS_TABS_ID"
:activeTabId="LearnersTabs.REPORTS"
:tabsId="REPORTS_LEARNERS_TABS_ID"
:activeTabId="ReportsLearnersTabs.REPORTS"
>
<ReportsControls :disableExport="true" />

Expand Down Expand Up @@ -102,7 +102,7 @@
import commonCoach from '../common';
import CoachAppBarPage from '../CoachAppBarPage';
import { PageNames } from '../../constants';
import { LEARNERS_TABS_ID, LearnersTabs } from '../../constants/tabsConstants';
import { REPORTS_LEARNERS_TABS_ID, ReportsLearnersTabs } from '../../constants/tabsConstants';
import ReportsLearnerHeader from './ReportsLearnerHeader';
import ReportsControls from './ReportsControls';
Expand All @@ -116,8 +116,8 @@
mixins: [commonCoach, commonCoreStrings],
data() {
return {
LEARNERS_TABS_ID,
LearnersTabs,
REPORTS_LEARNERS_TABS_ID,
ReportsLearnersTabs,
};
},
computed: {
Expand Down

0 comments on commit 3b91bd6

Please sign in to comment.