-
Notifications
You must be signed in to change notification settings - Fork 323
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
A drop-down that allows changing the execution mode. #6130
Merged
mergify
merged 21 commits into
develop
from
wip/MichaelMauderer/Execution_Context_Dropdown_Menu
Apr 18, 2023
Merged
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
11945cd
enso-5931 A drop-down that allows changing the execution mode.
MichaelMauderer a47b113
Changelog update.
MichaelMauderer 739e2f9
Revert opt level change.
MichaelMauderer 2abc196
Reduce unused crate dependencies.
MichaelMauderer 6426666
Merge remote-tracking branch 'origin/develop' into wip/MichaelMaudere…
MichaelMauderer d811fd2
Implement review feedback.
MichaelMauderer 883cb43
Add docs.
MichaelMauderer 37ec08f
Review feedback.
MichaelMauderer 6632a6f
Layout.
MichaelMauderer 2031123
Merge branch 'develop' into wip/MichaelMauderer/Execution_Context_Dro…
MichaelMauderer ed2e4f5
Fix shape offset.
MichaelMauderer f39f74d
Make the shape of the Play button bigger
vitvakatu b4f06ca
Remove logging.
MichaelMauderer 70a12ce
Merge branch 'develop' into wip/MichaelMauderer/Execution_Context_Dro…
MichaelMauderer 39ce6a2
Fix click overlay.
MichaelMauderer 9fda421
Add docs for workaround.
MichaelMauderer 9d38b2b
Fix default layer label.
MichaelMauderer 2781f0a
Merge branch 'develop' into wip/MichaelMauderer/Execution_Context_Dro…
MichaelMauderer 71f3bf0
Merge branch 'develop' into wip/MichaelMauderer/Execution_Context_Dro…
mergify[bot] 1748b1f
Merge branch 'develop' into wip/MichaelMauderer/Execution_Context_Dro…
mergify[bot] a004adb
Merge branch 'develop' into wip/MichaelMauderer/Execution_Context_Dro…
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[package] | ||
name = "debug-scene-execution-mode-dropdown" | ||
version = "0.1.0" | ||
authors = ["Enso Team <[email protected]>"] | ||
edition = "2021" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[dependencies] | ||
ensogl = { path = "../../../../../lib/rust/ensogl" } | ||
ensogl-drop-down-menu = { path = "../../../../../lib/rust/ensogl/component/drop-down-menu" } | ||
ensogl-list-view = { path = "../../../../../lib/rust/ensogl/component/list-view" } | ||
ensogl-hardcoded-theme = { path = "../../../../../lib/rust/ensogl/app/theme/hardcoded" } | ||
ensogl-text-msdf = { path = "../../../../../lib/rust/ensogl/component/text/src/font/msdf" } | ||
ide-view-execution-mode-selector = { path = "../../execution-mode-selector" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
//! This is a visualization example scene which creates a sinusoidal graph. | ||
|
||
// === Standard Linter Configuration === | ||
#![deny(non_ascii_idents)] | ||
#![warn(unsafe_code)] | ||
#![allow(clippy::bool_to_int_with_if)] | ||
#![allow(clippy::let_and_return)] | ||
// === Non-Standard Linter Configuration === | ||
#![warn(missing_copy_implementations)] | ||
#![warn(missing_debug_implementations)] | ||
#![warn(missing_docs)] | ||
#![warn(trivial_casts)] | ||
#![warn(trivial_numeric_casts)] | ||
#![warn(unused_import_braces)] | ||
#![warn(unused_qualifications)] | ||
|
||
use ensogl::prelude::*; | ||
|
||
use ensogl::animation; | ||
use ensogl::application::Application; | ||
use ensogl_text_msdf::run_once_initialized; | ||
use ide_view_execution_mode_selector as execution_mode_selector; | ||
|
||
|
||
|
||
// ====================== | ||
// === Initialisation === | ||
// ====================== | ||
|
||
fn make_entries() -> execution_mode_selector::ExecutionModes { | ||
Rc::new(vec!["development".to_string(), "production".to_string()]) | ||
} | ||
|
||
fn init(app: &Application) { | ||
let app = app.clone_ref(); | ||
let world = &app.display; | ||
let _scene = &world.default_scene; | ||
|
||
let execution_mode_selector = execution_mode_selector::ExecutionModeSelector::new(&app); | ||
world.add_child(&execution_mode_selector); | ||
execution_mode_selector.set_available_execution_modes(make_entries()); | ||
|
||
world | ||
.on | ||
.before_frame | ||
.add(move |_time_info: animation::TimeInfo| { | ||
let _keep_alive = &execution_mode_selector; | ||
}) | ||
.forget(); | ||
} | ||
|
||
|
||
// =================== | ||
// === Entry Point === | ||
// =================== | ||
|
||
/// Entry point for the demo scene. | ||
#[entry_point] | ||
#[allow(dead_code)] | ||
pub fn main() { | ||
run_once_initialized(|| { | ||
let app = Application::new("root"); | ||
init(&app); | ||
mem::forget(app); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[package] | ||
name = "ide-view-execution-mode-selector" | ||
version = "0.1.0" | ||
authors = ["Enso Team <[email protected]>"] | ||
edition = "2021" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "rlib"] | ||
|
||
[dependencies] | ||
enso-frp = { path = "../../../../lib/rust/frp" } | ||
enso-prelude = { path = "../../../../lib/rust/prelude" } | ||
ensogl = { path = "../../../../lib/rust/ensogl" } | ||
ensogl-derive-theme = { path = "../../../../lib/rust/ensogl/app/theme/derive" } | ||
ensogl-drop-down-menu = { path = "../../../../lib/rust/ensogl/component/drop-down-menu" } | ||
ensogl-gui-component = { path = "../../../../lib/rust/ensogl/component/gui" } | ||
ensogl-hardcoded-theme = { path = "../../../../lib/rust/ensogl/app/theme/hardcoded" } | ||
ensogl-list-view = { path = "../../../../lib/rust/ensogl/component/list-view" } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no section