Skip to content

Commit

Permalink
Add Plotlyst roadmap panel (#1337)
Browse files Browse the repository at this point in the history
* Add Plotlyst roadmap panel

* progress

* fix tests

* version and link

* tags

* filter by version

* task summary tooltip

* header

* counter

* version counters

* filter by tags

* space

* buttons
  • Loading branch information
zkovari authored Sep 25, 2024
1 parent 669ac41 commit e5d2f01
Show file tree
Hide file tree
Showing 7 changed files with 886 additions and 37 deletions.
6 changes: 5 additions & 1 deletion src/main/python/plotlyst/core/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2231,7 +2231,7 @@ class SensoryPerception:
class SensoryDetail:
night_mode: bool = field(default=False, metadata=config(exclude=exclude_if_false))
perceptions: Dict[str, SensoryPerception] = field(default_factory=dict,
metadata=config(exclude=exclude_if_empty))
metadata=config(exclude=exclude_if_empty))


@dataclass
Expand Down Expand Up @@ -2319,6 +2319,9 @@ class Task(CharacterBased):
summary: str = field(default='', metadata=config(exclude=exclude_if_empty))
character_id: Optional[uuid.UUID] = None
tags: List[str] = field(default_factory=list, metadata=config(exclude=exclude_if_empty))
web_link: str = field(default='', metadata=config(exclude=exclude_if_empty))
version: str = field(default='', metadata=config(exclude=exclude_if_empty))
beta: bool = field(default=False, metadata=config(exclude=exclude_if_false))

def __post_init__(self):
if self.creation_date is None:
Expand Down Expand Up @@ -2355,6 +2358,7 @@ def default_task_statues() -> List[TaskStatus]:
class Board:
tasks: List[Task] = field(default_factory=list)
statuses: List[TaskStatus] = field(default_factory=default_task_statues)
tags: Dict[str, SelectionItem] = field(default_factory=dict, metadata=config(exclude=exclude_if_empty))


class TemplateStoryStructureType(Enum):
Expand Down
7 changes: 5 additions & 2 deletions src/main/python/plotlyst/view/home_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from plotlyst.view.dialog.home import StoryCreationDialog
from plotlyst.view.generated.home_view_ui import Ui_HomeView
from plotlyst.view.icons import IconRegistry
from plotlyst.view.roadmap_view import RoadmapView
from plotlyst.view.style.base import apply_border_image
from plotlyst.view.style.button import apply_button_palette_color
from plotlyst.view.widget.confirm import confirmed
Expand Down Expand Up @@ -112,7 +113,6 @@ def __init__(self):

self.ui.btnTutorials.setHidden(True)
self.ui.btnProgress.setHidden(True)
self.ui.btnRoadmap.setHidden(True)

self.ui.lblWelcomeMain.setText(home_page_welcome_text)

Expand Down Expand Up @@ -181,6 +181,9 @@ def __init__(self):
(self.ui.btnProgress, self.ui.pageProgress),
(self.ui.btnRoadmap, self.ui.pageRoadmap)])

self._roadmapView = RoadmapView()
self.ui.pageRoadmap.layout().addWidget(self._roadmapView)

# self._tutorialsTreeView = TutorialsTreeView(settings=TreeSettings(font_incr=2))
# self._tutorialsTreeView.tutorialSelected.connect(self._tutorial_selected)
# self.ui.splitterTutorials.setSizes([150, 500])
Expand All @@ -201,7 +204,7 @@ def __init__(self):
# incr_font(self.ui.lineTutorialTitle, 10)
# bold(self.ui.lineTutorialTitle)

self.ui.btnLibrary.setChecked(True)
self.ui.btnRoadmap.setChecked(True)
self.ui.stackWdgNovels.setCurrentWidget(self.ui.pageEmpty)

self._novels = client.novels()
Expand Down
2 changes: 2 additions & 0 deletions src/main/python/plotlyst/view/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ def __init__(self, *args, **kwargs):

QApplication.instance().installEventFilter(CapitalizationEventFilter(self))

self.home_mode.setChecked(True)

@overrides
def closeEvent(self, event: QCloseEvent) -> None:
if language_tool_proxy.is_set():
Expand Down
Loading

0 comments on commit e5d2f01

Please sign in to comment.