Skip to content

Commit

Permalink
Merge branch 'develop' into wip/radeusgd/remove-array-set-at-182879865
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Aug 25, 2022
2 parents 01011f5 + 4537a4b commit e2093bf
Show file tree
Hide file tree
Showing 11 changed files with 458 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- id: changed_files
run: "git fetch\nlist=`git diff --name-only origin/develop HEAD | tr '\\n' ' '`\necho $list\necho \"::set-output name=list::'$list'\""
- run: "if [[ ${{ contains(steps.changed_files.outputs.list,'CHANGELOG.md') || contains(github.event.head_commit.message,'[ci no changelog needed]') || contains(github.event.pull_request.body,'[ci no changelog needed]') || github.event.pull_request.user.login == 'dependabot' }} == false ]]; then exit 1; fi"
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -352,7 +352,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -399,7 +399,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -446,7 +446,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -496,7 +496,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -544,7 +544,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -594,7 +594,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -643,7 +643,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -289,7 +289,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -346,7 +346,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -398,7 +398,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -452,7 +452,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scala-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
- name: Checking out the repository
uses: actions/checkout@v2
with:
clean: true
clean: false
- name: Build Script Setup
run: "./run --help"
env:
Expand Down
11 changes: 6 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ crate-type = ["cdylib", "rlib"]
enso-frp = { path = "../../../../../lib/rust/frp" }
ensogl-core = { path = "../../../../../lib/rust/ensogl/core" }
ensogl-gui-component = { path = "../../../../../lib/rust/ensogl/component/gui/" }
ensogl-grid-view = { path = "../../../../../lib/rust/ensogl/component/grid-view/" }
ensogl-hardcoded-theme = { path = "../../../../../lib/rust/ensogl/app/theme/hardcoded" }
ensogl-derive-theme = { path = "../../../../../lib/rust/ensogl/app/theme/derive" }
ensogl-list-view = { path = "../../../../../lib/rust/ensogl/component/list-view" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use ensogl_core::display::shape::*;
use ensogl_core::prelude::*;

use crate::layout;
use crate::layouting;
use crate::searcher_theme;
use crate::GroupId;
Expand Down Expand Up @@ -87,9 +88,10 @@ impl Model {
let overall_width = style.content_width - 2.0 * style.content_padding;
let column_width = (overall_width - 2.0 * style.column_gap) / NUMBER_OF_COLUMNS as f32;

let groups = content.iter().enumerate().map(|(index, provider)| {
let height = provider.original_entry_count;
layouting::Group { index, height }
let groups = content.iter().enumerate().map(|(index, provider)| layout::Group {
id: GroupId { section: *section, index },
height: provider.content.entry_count(),
original_height: provider.original_entry_count,
});
let arrangement = layouting::Layouter::new(groups).arrange();

Expand Down Expand Up @@ -127,7 +129,8 @@ impl Model {
for entry in content.iter() {
const DEFAULT_COLUMN_INDEX: usize = 1;
let mut arranged = arrangement.iter().enumerate();
let column_index = arranged.find_map(|(i, c)| c.contains(&entry.index).then_some(i));
let column_index =
arranged.find_map(|(i, c)| c.iter().find(|g| g.id.index == entry.index).map(|_| i));
let column_index = column_index.unwrap_or(DEFAULT_COLUMN_INDEX);
columns[column_index].push(&entry.content);
heights[column_index] += entry.content.size.value().y + style.column_gap;
Expand Down
Loading

0 comments on commit e2093bf

Please sign in to comment.