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

separated tabs from ui crate #269

Merged
merged 5 commits into from
Mar 25, 2024
Merged

separated tabs from ui crate #269

merged 5 commits into from
Mar 25, 2024

Conversation

rewin123
Copy link
Owner

@rewin123 rewin123 commented Mar 25, 2024

Currently its just code moving. Want to split separations PRs in multiple steps

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

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

Project coverage is 34.78%. Comparing base (a8a7831) to head (96e8551).

Files Patch % Lines
crates/editor_tabs/src/lib.rs 0.00% 174 Missing ⚠️
crates/editor_tabs/src/sizing.rs 0.00% 31 Missing ⚠️
crates/editor_tabs/src/schedule_editor_tab.rs 0.00% 10 Missing ⚠️
crates/editor_tabs/src/colors.rs 0.00% 3 Missing ⚠️
crates/editor_ui/src/change_chain.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             v0.6     #269   +/-   ##
=======================================
  Coverage   34.78%   34.78%           
=======================================
  Files          58       62    +4     
  Lines        9301     9301           
=======================================
  Hits         3235     3235           
  Misses       6066     6066           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@naomijub
Copy link
Collaborator

Should this target main or v0.6? Being a major change, I would target v0.6

@rewin123
Copy link
Owner Author

Should this target main or v0.6? Being a major change, I would target v0.6

Oh, yes. Misselect

@rewin123 rewin123 changed the base branch from main to v0.6 March 25, 2024 13:59
@rewin123 rewin123 marked this pull request as ready for review March 25, 2024 14:52
@rewin123 rewin123 requested a review from naomijub March 25, 2024 14:57
"modules/bevy_xpbd_plugin"
]
, "crates/editor_tabs"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already included in "crates/*"


[workspace.package]
version = "0.5.0"
version = "0.6.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥁

@@ -22,6 +22,7 @@ space_prefab.workspace = true
space_undo.workspace = true
space_persistence.workspace = true
space_shared.workspace = true
space_editor_tabs.workspace = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you checked which crates can be removed from editor_ui cargo.toml?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's in the plans

@@ -0,0 +1,15 @@
/// Colors used in editor
use bevy_egui::egui::{Color32, Stroke};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think color, sizing and typography would live better in the UI crate, as they are ui elements. If this crate is the one responsible for the application ui, maybe call this editor_ui and the other editor_ui_extensions/editor_ui_components?

Copy link
Owner Author

@rewin123 rewin123 Mar 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is undoubtedly better located in editor_ui crate. However, these colours are referenced by editor_tabs. However, the PR is already quite large, so I decided to stop with just shuffling the code for now. And the improvement of the separations will be in multiple PRs


#[derive(Resource, Clone, PartialEq, Reflect, InspectorOptions)]
#[reflect(Resource, Default, InspectorOptions)]
pub struct Sizing {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as color comment

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

use space_undo::ChangeChain;

pub struct ChangeChainViewPlugin;

impl Plugin for ChangeChainViewPlugin {
fn build(&self, app: &mut App) {
app.editor_tab_by_trait(
super::editor_tab::EditorTabName::Other("Change Chain".to_string()),
EditorTabName::Other("Change Chain".to_string()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX suggested that Change Chain is a non intuitive name for Undo/Redo logic, Maybe we could call it Undo Chain, Undo/Redo Config or Undo Max Chain?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can! But in another PR, this PR only about code moving

@rewin123 rewin123 merged commit b242393 into v0.6 Mar 25, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants