Skip to content

Commit

Permalink
fix: fixing ordering of schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
wllfaria committed Apr 23, 2024
1 parent 1fa76cf commit 4a0c3c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions reqtui/src/schema/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ where
collections.push(schema);
}

collections.sort_by(|a, b| a.info.name.cmp(&b.info.name));

Ok(collections)
}

Expand Down
7 changes: 2 additions & 5 deletions tui/src/components/api_explorer/api_explorer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::components::{
api_explorer::{
req_uri::ReqUri,
req_uri::ReqUriState,
res_viewer::{ResViewer, ResViewerState, ResViewerTabs},
sidebar::{Sidebar, SidebarState},
},
Component,
Expand All @@ -22,11 +24,6 @@ use ratatui::{
use std::{collections::HashMap, ops::Add};
use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender};

use super::{
req_uri::ReqUriState,
res_viewer::{ResViewer, ResViewerState, ResViewerTabs},
};

#[derive(Debug, PartialEq)]
pub struct ExplorerLayout {
pub sidebar: Rect,
Expand Down
2 changes: 2 additions & 0 deletions tui/tests/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,8 @@ fn test_draw_delete_prompt() {
.map(|row| row.iter().map(|cell| cell.symbol()).collect::<String>())
.collect::<Vec<_>>();

println!("{:?}", frame.buffer_mut());

assert_eq!(rendered, expected);
}

Expand Down

0 comments on commit 4a0c3c2

Please sign in to comment.