Skip to content

Commit

Permalink
Add hide visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielleHuisman committed Apr 7, 2024
1 parent 322c704 commit 602fb22
Show file tree
Hide file tree
Showing 6 changed files with 355 additions and 11 deletions.
7 changes: 4 additions & 3 deletions packages/dom/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ use web_sys::{Element, Window};
pub use floating_ui_core::middleware::{
ApplyState, ArrowData, ArrowOptions, AutoPlacementData, AutoPlacementDataOverflow,
AutoPlacementOptions, DefaultLimiter, FallbackStrategy, FlipData, FlipDataOverflow,
FlipOptions, LimitShift, LimitShiftOffset, LimitShiftOffsetValues, LimitShiftOptions,
OffsetData, OffsetOptions, OffsetOptionsValues, ShiftData, ShiftOptions, SizeOptions,
ARROW_NAME, AUTO_PLACEMENT_NAME, FLIP_NAME, HIDE_NAME, OFFSET_NAME, SHIFT_NAME, SIZE_NAME,
FlipOptions, HideData, HideOptions, HideStrategy, LimitShift, LimitShiftOffset,
LimitShiftOffsetValues, LimitShiftOptions, OffsetData, OffsetOptions, OffsetOptionsValues,
ShiftData, ShiftOptions, SizeOptions, ARROW_NAME, AUTO_PLACEMENT_NAME, FLIP_NAME, HIDE_NAME,
OFFSET_NAME, SHIFT_NAME, SIZE_NAME,
};

/// Provides data to position an inner element of the floating element so that it appears centered to the reference element.
Expand Down
12 changes: 6 additions & 6 deletions packages/leptos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ pub use floating_ui_dom::{
AutoUpdateOptions, Axis, ClientRectObject, ComputePositionConfig, ComputePositionReturn,
Coords, DefaultLimiter, Derivable, DerivableFn, DetectOverflowOptions, Dimensions,
ElementOrVirtual, ElementRects, FallbackStrategy, Flip, FlipData, FlipDataOverflow,
FlipOptions, Length, LimitShift, LimitShiftOffset, LimitShiftOffsetValues, LimitShiftOptions,
Middleware, MiddlewareData, MiddlewareReturn, MiddlewareState, MiddlewareVec,
MiddlewareWithOptions, Offset, OffsetData, OffsetOptions, OffsetOptionsValues, Padding,
Placement, Rect, Shift, ShiftData, ShiftOptions, Side, Size, SizeOptions, Strategy,
VirtualElement, ARROW_NAME, AUTO_PLACEMENT_NAME, FLIP_NAME, HIDE_NAME, OFFSET_NAME, SHIFT_NAME,
SIZE_NAME,
FlipOptions, Hide, HideData, HideOptions, HideStrategy, Length, LimitShift, LimitShiftOffset,
LimitShiftOffsetValues, LimitShiftOptions, Middleware, MiddlewareData, MiddlewareReturn,
MiddlewareState, MiddlewareVec, MiddlewareWithOptions, Offset, OffsetData, OffsetOptions,
OffsetOptionsValues, Padding, Placement, Rect, Shift, ShiftData, ShiftOptions, Side, Size,
SizeOptions, Strategy, VirtualElement, ARROW_NAME, AUTO_PLACEMENT_NAME, FLIP_NAME, HIDE_NAME,
OFFSET_NAME, SHIFT_NAME, SIZE_NAME,
};
3 changes: 2 additions & 1 deletion packages/leptos/tests/playwright.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
use std::{env, fs, path::Path, process::Command};

const IMPLEMENTED_TESTS: [&str; 16] = [
const IMPLEMENTED_TESTS: [&str; 17] = [
"arrow",
"autoPlacement",
"autoUpdate",
"border",
"containing-block",
"decimal-size",
"flip",
"hide",
"offset",
"placement",
"relative",
Expand Down
3 changes: 2 additions & 1 deletion packages/leptos/tests/visual/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::spec::border::Border;
use crate::spec::containing_block::ContainingBlock;
use crate::spec::decimal_size::DecimalSize;
use crate::spec::flip::Flip;
use crate::spec::hide::Hide;
use crate::spec::offset::Offset;
use crate::spec::placement::Placement;
use crate::spec::relative::Relative;
Expand Down Expand Up @@ -114,7 +115,7 @@ pub fn App() -> impl IntoView {
<Route path="size" view=Size />
<Route path="arrow" view=Arrow />
<Route path="offset" view=Offset />
// <Route path="hide" view=Hide />
<Route path="hide" view=Hide />
<Route path="autoPlacement" view=AutoPlacement />
// <Route path="inline" view=Inline />
<Route path="autoUpdate" view=AutoUpdate />
Expand Down
1 change: 1 addition & 0 deletions packages/leptos/tests/visual/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pub mod border;
pub mod containing_block;
pub mod decimal_size;
pub mod flip;
pub mod hide;
pub mod offset;
pub mod placement;
pub mod relative;
Expand Down
Loading

0 comments on commit 602fb22

Please sign in to comment.