Component List Panel View Acceptance Fixes (#3576)

Updates the Component List Panel View to resolve issues spotted during acceptance review:
* order between "Local Scopes" and "Favourites Section" is switched.
* Headers in demo scenes now include a number indicating the index

https://user-images.githubusercontent.com/1428930/178252570-21405174-2a0f-4f58-8033-6a1a0055a16e.mp4

# Important Notes
[ci no changelog needed]
This commit is contained in:
Michael Mauderer 2022-07-12 12:06:36 +02:00 committed by GitHub
parent c1aa4aac87
commit ca034484b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -363,9 +363,11 @@ impl Model {
let full_height = favourites_section_height + local_scope_height + sub_modules_height; let full_height = favourites_section_height + local_scope_height + sub_modules_height;
self.sub_modules_section.set_base_position_y(0.0, style); self.sub_modules_section.set_base_position_y(0.0, style);
self.favourites_section.set_base_position_y(-sub_modules_height, style); let local_scope_y = -sub_modules_height;
let local_scope_y = -favourites_section_height - sub_modules_height;
self.local_scope_section.set_base_position_y(local_scope_y, style); self.local_scope_section.set_base_position_y(local_scope_y, style);
let favourites_section_y = -local_scope_height - sub_modules_height;
self.favourites_section.set_base_position_y(favourites_section_y, style);
self.scroll_area.set_content_height(full_height); self.scroll_area.set_content_height(full_height);
self.scroll_area.jump_to_y(full_height); self.scroll_area.jump_to_y(full_height);

View File

@ -131,9 +131,10 @@ fn mock_data() -> Vec<LabeledAnyModelProvider> {
random_entry(6), random_entry(6),
] ]
.into_iter() .into_iter()
.map(|mock_entries| LabeledAnyModelProvider { .enumerate()
.map(|(index, mock_entries)| LabeledAnyModelProvider {
content: AnyModelProvider::from(mock_entries.clone_ref()), content: AnyModelProvider::from(mock_entries.clone_ref()),
label: "Header".into(), label: format!("Header {}", index),
}) })
.collect_vec() .collect_vec()
} }