Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.94.0"
channel = "1.95.0"
profile = "minimal"
2 changes: 1 addition & 1 deletion src/bin/mapcat/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl MapSender {
return false;
}

while let Err(e) = surf::get(format!("http://localhost:{DEFAULT_PORT}/healthcheck",))
while let Err(e) = surf::get(format!("http://localhost:{DEFAULT_PORT}/healthcheck"))
.send()
.await
{
Expand Down
14 changes: 6 additions & 8 deletions src/map/mapvas_egui/layer/shape_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ impl ShapeLayer {
received = true;
let l = self.shape_map.entry(id.clone()).or_default();
let start_idx = l.len();
l.extend(geometries.into_iter());
l.extend(geometries);
self.layer_visibility.entry(id.clone()).or_insert(true);

for i in start_idx..l.len() {
Expand Down Expand Up @@ -2675,14 +2675,12 @@ impl ShapeLayer {

for &path_index in nested_path {
match current_geometry {
Geometry::GeometryCollection(nested_geometries, _) => {
if path_index < nested_geometries.len() {
current_geometry = &nested_geometries[path_index];
} else {
return None; // Invalid path index
}
Geometry::GeometryCollection(nested_geometries, _)
if path_index < nested_geometries.len() =>
{
current_geometry = &nested_geometries[path_index];
}
_ => return None, // Path continues but current geometry is not a collection
_ => return None,
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/map/mapvas_egui/layer/tile_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ impl TileLayer {
});

let render_result =
tokio::time::timeout(std::time::Duration::from_secs(60), render_rx).await;
tokio::time::timeout(std::time::Duration::from_mins(1), render_rx).await;

let render_duration = render_start.elapsed();

Expand Down
2 changes: 1 addition & 1 deletion src/mapvas_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ impl Sidebar {
for category in category_order {
if let Some(mut tasks) = tasks_by_category.remove(&category) {
// Sort by elapsed time (newest first)
tasks.sort_by_key(|(_, task)| std::cmp::Reverse(task.elapsed()));
tasks.sort_by_cached_key(|(_, task)| std::cmp::Reverse(task.elapsed()));

let category_name = match category {
TaskCategory::TileLoad => "🗺 Tile Loading",
Expand Down
18 changes: 8 additions & 10 deletions src/parser/geojson.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,23 +760,21 @@ mod tests {

for geometry in &layer.geometries {
match geometry {
Geometry::Point(_, metadata) => {
Geometry::Point(_, metadata)
if metadata
.time_data
.as_ref()
.is_some_and(|td| td.timestamp.is_some())
{
features_with_timestamps += 1;
}
.is_some_and(|td| td.timestamp.is_some()) =>
{
features_with_timestamps += 1;
}
Geometry::LineString(_, metadata) => {
Geometry::LineString(_, metadata)
if metadata
.time_data
.as_ref()
.is_some_and(|td| td.time_span.is_some())
{
features_with_time_spans += 1;
}
.is_some_and(|td| td.time_span.is_some()) =>
{
features_with_time_spans += 1;
}
_ => {}
}
Expand Down
15 changes: 6 additions & 9 deletions src/parser/gpx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,19 +340,16 @@ mod tests {

for geometry in &layer.geometries {
match geometry {
Geometry::Point(_, metadata) => {
if metadata.time_data.is_some() {
timestamped_points += 1;
}
Geometry::Point(_, metadata) if metadata.time_data.is_some() => {
timestamped_points += 1;
}
Geometry::LineString(_, metadata) => {
Geometry::LineString(_, metadata)
if metadata
.time_data
.as_ref()
.is_some_and(|td| td.time_span.is_some())
{
linestrings_with_timespan += 1;
}
.is_some_and(|td| td.time_span.is_some()) =>
{
linestrings_with_timespan += 1;
}
_ => {}
}
Expand Down
2 changes: 1 addition & 1 deletion src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ pub async fn remote_runner(remote: Remote) {

// Keep it running.
loop {
tokio::time::sleep(tokio::time::Duration::from_secs(3600)).await;
tokio::time::sleep(tokio::time::Duration::from_hours(1)).await;
}
}

Expand Down
6 changes: 1 addition & 5 deletions src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,7 @@ impl SearchManager {
}

// Sort by relevance (highest first)
all_results.sort_by(|a, b| {
b.relevance
.partial_cmp(&a.relevance)
.unwrap_or(std::cmp::Ordering::Equal)
});
all_results.sort_by(|a, b| b.relevance.total_cmp(&a.relevance));

// Limit total results
all_results.truncate(10);
Expand Down
4 changes: 2 additions & 2 deletions tests/grid_snapshot_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::fs;
use std::io::Cursor;

fn create_test_app_with_geojson_grid_mode(geojson_content: String) -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand All @@ -33,7 +33,7 @@ fn create_test_app_with_geojson_grid_mode(geojson_content: String) -> MapApp {
}

fn create_test_app_grid_mode() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand Down
2 changes: 1 addition & 1 deletion tests/highlight_snapshot_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::fs;
use std::io::Cursor;

fn create_test_app_with_geometries() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand Down
2 changes: 1 addition & 1 deletion tests/popup_double_click_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use mapvas::{
use std::io::Cursor;

fn create_test_app_with_nested_kml() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand Down
2 changes: 1 addition & 1 deletion tests/popup_snapshot_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::fs;
use std::io::Cursor;

fn create_test_app_with_popup_kml() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand Down
Binary file modified tests/snapshots/coordinates_grid_only_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/coordinates_off_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/debug_range_timeline_fixed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/empty_grid_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/empty_grid_mode_clean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/geojson_grid_clean_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/geojson_on_grid_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/geometry_shapes_expanded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/geometry_ui_ready_for_interaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/grid_mode_sidebar_collapsed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/grid_mode_sidebar_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/grid_only_mode_basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/large_file_temporal_range.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_functionality_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_initial_sidebar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_memory_management_stable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_nested_expanded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_nested_initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_nested_ready_for_interaction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_shape_layer_expanded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_shapes_visible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/popup_sidebar_with_collections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/temporal_filtering_after_animation_started.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/temporal_filtering_after_controls_visible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/snapshots/temporal_initial_state.png
Binary file modified tests/snapshots/temporal_morning_state.png
Binary file modified tests/snapshots/temporal_timeline_expanded.png
Binary file modified tests/snapshots/temporal_with_geometries.png
Binary file modified tests/snapshots/temporal_workflow_step1_timeline_available.png
Binary file modified tests/snapshots/temporal_workflow_step2_controls_expanded.png
Binary file modified tests/snapshots/temporal_workflow_step3_temporal_data_loaded.png
Binary file modified tests/snapshots/unix_epoch_first_timestamp.png
Binary file modified tests/snapshots/unix_epoch_no_timezone_parsed.png
Binary file modified tests/snapshots/unix_epoch_timeline_controls_visible.png
Binary file modified tests/snapshots/unix_epoch_timeline_detected.png
Binary file modified tests/snapshots/workflow_final_grid_view.png
Binary file modified tests/snapshots/workflow_grid_mode_active.png
Binary file modified tests/snapshots/workflow_settings_opened.png
10 changes: 5 additions & 5 deletions tests/temporal_snapshot_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::fs;
use std::io::Cursor;

fn create_test_app_with_temporal_kml() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand All @@ -36,7 +36,7 @@ fn create_test_app_with_temporal_kml() -> MapApp {
}

fn create_test_app_with_unix_epoch_kml() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand Down Expand Up @@ -388,7 +388,7 @@ async fn unix_epoch_temporal_filtering() {
}

fn create_test_app_with_debug_range_kml() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand All @@ -413,7 +413,7 @@ fn create_test_app_with_debug_range_kml() -> MapApp {
}

fn create_test_app_with_unix_epoch_no_tz_kml() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand Down Expand Up @@ -527,7 +527,7 @@ async fn large_file_temporal_parsing() {
</Document>
</kml>"#;

let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (mut map, remote, data_holder) = Map::new(ctx);
map.set_headless();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use egui_kittest::kittest::Queryable;
use mapvas::{config::Config, map::mapvas_egui::Map, mapvas_ui::MapApp};

fn create_test_app() -> MapApp {
let config = Config::new();
let config = Config::default();
let ctx = egui::Context::default();
let (map, remote, data_holder) = Map::new(ctx);
MapApp::new(map, remote, data_holder, config, None)
Expand Down
Loading