Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(pages): simplify page lifecycle removing the redundant concept of visibility #23

Merged
merged 1 commit into from
Jun 30, 2024

Conversation

robertpsoane
Copy link
Owner

  • In the first pass of the Containers and Images pages, there was a concept of "visibility"; this was before the Page trait had been added

  • This removes the concept of visibility (and the corrolorary call to initialise

  • Instead there is a single initialise method

  • Where clean-up is required for a page, there is a Close trait that must be implemented by all Pages

  • The close method has a default behaviour, this could go in a simple procedural macro with time but for now it just falls back on the default behaviour where no clean-up is requried for the page

…pt of visibility

- In the first pass of the Containers and Images pages, there was a
  concept of "visibility"; this was before the Page trait had been
added

- This removes the concept of visibility (and the corrolorary call to
  `initialise`

- Instead there is a single `initialise` method

- Where clean-up is required for a page, there is a `Close` trait that
  must be implemented by all Pages

- The close method has a default behaviour, this could go in a simple
  procedural macro with time but for now it just falls back on the
default behaviour where no clean-up is requried for the page
Copy link

codecov bot commented Jun 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Files Coverage Δ
src/widgets/modal.rs 0.00% <0.00%> (ø)
src/pages/images.rs 0.00% <0.00%> (ø)
src/pages/containers.rs 0.00% <0.00%> (ø)
src/traits/page.rs 0.00% <0.00%> (ø)
src/ui/page_manager.rs 0.00% <0.00%> (ø)
src/pages/attach.rs 0.00% <0.00%> (ø)
src/pages/logs.rs 0.00% <0.00%> (ø)

@robertpsoane robertpsoane merged commit c3a051e into master Jun 30, 2024
12 checks passed
@robertpsoane robertpsoane deleted the rs/simplify-page-lifecycle branch June 30, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant