Skip to content

Commit

Permalink
mod: refactor, rename components
Browse files Browse the repository at this point in the history
  • Loading branch information
Odaimoko committed Jul 12, 2024
1 parent 6cdedf3 commit a1666da
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions src/ui/obsidian/help-page/basic-tutorial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {usePluginSettings} from "../../../settings/settings";
import {ObsidianIconView} from "../../react-view/obsidian-icon-view";
import {Icon_ManagePage} from "../manage-page-view";
import {DataTable} from "../../pure-react/view-template/data-table";
import {WorkflowTypeLegend} from "../../react-view/workflow-filter";
import {WorkflowTypeLegend} from "../../react-view/workflow-filter-view";
import {HashTagView} from "../../common/hash-tag-view";
import {
Tag_Prefix_Step,
Expand All @@ -30,8 +30,8 @@ import {
import {InlineCodeView} from "../../common/inline-code-view";
import {MarkdownFrontMatterView} from "../../common/markdown-front-matter-view";
import {FileNavView} from "../../common/file-nav-view";
import {ProjectFilterName_All} from "../../react-view/project-filter";
import {OrphanTaskButtonAndPanel} from "../../react-view/fix-orphan-tasks";
import {ProjectFilterName_All} from "../../react-view/project-filter-view";
import {OrphanTaskButtonAndPanel} from "../../react-view/fix-orphan-tasks-view";
import {Desc_ManagePage, HelpPage_Template, HelpPage_UserManual} from "./help-page-view";
import {centerChildrenVertStyle} from "../../pure-react/style-def";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {TwiceConfirmButton} from "../pure-react/view-template/twice-confirm-butt
import {ObsidianIconView} from "./obsidian-icon-view";
import {getDefaultTableStyleGetters, OdaTaskSummaryCell} from "./task-table-view";
import {ProjectView} from "./project-view";
import {ClickableWorkflowView} from "./workflow-filter";
import {ClickableWorkflowView} from "./workflow-filter-view";
import {DataTable} from "../pure-react/view-template/data-table";
import React, {useState} from "react";
import {ProjectFilterName_All} from "./project-filter";
import {ProjectFilterName_All} from "./project-filter-view";
import {OdaPmTask} from "../../data-model/OdaPmTask";
import {warningColor} from "../pure-react/style-def";

Expand Down Expand Up @@ -103,7 +103,7 @@ export function OrphanTaskButtonAndPanel(props: {
</div>;
}

export function FixOrphanTasks({db}: { db?: OdaPmDb }) {
export function FixOrphanTasksView({db}: { db?: OdaPmDb }) {
const orphanTasks = db?.orphanTasks || [];
if (orphanTasks.length === 0) return <></>;
return <OrphanTaskButtonAndPanel orphanTasks={orphanTasks}/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const AllProjectsOption = {
optionValue: ProjectFilterOptionValue_All
} as OptionValueType;

export function ProjectFilter(props: {
export function ProjectFilterView(props: {
allProjects: OdaPmProject[],
dropdownProjects: OdaPmProject[],
handleSetDisplayNames: (names: string[]) => void,
Expand Down
32 changes: 16 additions & 16 deletions src/ui/react-view/react-manage-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {Evt_DbReloaded, Evt_JumpTask, Evt_JumpWorkflow, Evt_ManagePageReRender}
import {devLog} from "../../utils/env-util";
import {OdaPmTask} from "../../data-model/OdaPmTask";
import {TaskTableView} from "./task-table-view";
import {WorkflowFilter} from "./workflow-filter";
import {TagFilter} from "./tag-filter";
import {ProjectFilter, ProjectFilterOptionValue_All} from "./project-filter";
import {WorkflowFilterView} from "./workflow-filter-view";
import {TagFilterView} from "./tag-filter-view";
import {ProjectFilterOptionValue_All, ProjectFilterView} from "./project-filter-view";
import {HStack} from "../pure-react/view-template/h-stack";
import {FixOrphanTasks} from "./fix-orphan-tasks";
import {FixOrphanTasksView} from "./fix-orphan-tasks-view";
import {ModuleFilter} from "./module-filter";

function isInAnyProject(projectTask: I_OdaPmProjectTask, displayPrjNames: string[]) {
Expand Down Expand Up @@ -231,25 +231,25 @@ export function ReactManagePage({eventCenter}: {
return (
<div>
<HStack>
<ProjectFilter allProjects={allProjects} dropdownProjects={dropdownProjects}
displayNames={displayProjectOptionValues}
handleSetDisplayNames={handleSetDisplayProjects}
<ProjectFilterView allProjects={allProjects} dropdownProjects={dropdownProjects}
displayNames={displayProjectOptionValues}
handleSetDisplayNames={handleSetDisplayProjects}
/>
</HStack>
<FixOrphanTasks db={db}/>

<WorkflowFilter workflows={workflows} displayNames={displayWorkflowNames}
handleSetDisplayNames={handleSetDisplayWorkflows}
showSubprojectWorkflows={showSubprojectWorkflows}
setShowSubprojectWorkflows={setShowSubprojectWorkflows}
showUnclassifiedWorkflows={showUnclassified}
setShowUnclassifiedWorkflows={setShowUnclassified}
<FixOrphanTasksView db={db}/>

<WorkflowFilterView workflows={workflows} displayNames={displayWorkflowNames}
handleSetDisplayNames={handleSetDisplayWorkflows}
showSubprojectWorkflows={showSubprojectWorkflows}
setShowSubprojectWorkflows={setShowSubprojectWorkflows}
showUnclassifiedWorkflows={showUnclassified}
setShowUnclassifiedWorkflows={setShowUnclassified}
/>

{getSettings()?.manage_page_header_as_module &&
<ModuleFilter modules={filteredModules} displayModuleIds={displayModuleIds}
handleSetDisplayModuleIds={handleSetDisplayModuleIds}/>}
<TagFilter
<TagFilterView
pmTags={pmTags}
rectifiedExcludedTags={rectifiedExcludedTags}
rectifiedDisplayTags={rectifiedDisplayTags}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const tagIncludedIcon = "check"
const tagExcludedIcon = "x"
const noTagIcon = "scan"

export function TagFilter({
export function TagFilterView({
pmTags,
rectifiedExcludedTags,
rectifiedDisplayTags,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function DropdownWorkflowView(props: {

// endregion
// region Workflow Filter
export const WorkflowFilter = (props: {
export const WorkflowFilterView = (props: {
workflows: I_OdaPmWorkflow[],
displayNames: string[],
handleSetDisplayNames: (names: string[]) => void,
Expand Down

0 comments on commit a1666da

Please sign in to comment.