Skip to content

Commit 52a71c7

Browse files
authored
Merge branch 'main' into 2331-cartesian-grid-add-stroke-color-property
2 parents e2268b9 + e9d8fab commit 52a71c7

File tree

570 files changed

+24986
-5669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

570 files changed

+24986
-5669
lines changed

.github/workflows/frontend-formatting-linting-checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
branches: [main, master]
1111
paths:
1212
- "src/frontend/**"
13+
workflow_dispatch:
1314

1415
jobs:
1516
frontend-checks:

.github/workflows/react-doctor.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: React Doctor Checks
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches: [main, master]
7+
paths:
8+
- "src/frontend/**"
9+
pull_request:
10+
branches: [main, master]
11+
paths:
12+
- "src/frontend/**"
13+
workflow_dispatch:
14+
15+
jobs:
16+
react-doctor:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Run React Doctor
22+
uses: millionco/react-doctor@main
23+
with:
24+
directory: ./src/frontend
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## Review Checklist
2+
3+
- [ ] Run IvyFeatureTester with a positional record type and verify `DataTableBuilder.Remove()` renders remaining columns correctly
4+
- [ ] Test with EF Core / database-backed `IQueryable` to confirm the expression tree translates to valid SQL (the default values for removed params should be excluded from the SELECT)

AGENTS.md

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class MyView : ViewBase
2929
}
3030
}
3131

32-
The topmost view in an Ivy application is called an [App](https://docs.ivy.app/onboarding/concepts/apps.md) and is decorated with the `[App]` attribute. The attribute uses **named parameters**: The attribute uses **named parameters**:
32+
The topmost view in an Ivy application is called an [App](https://docs.ivy.app/onboarding/concepts/apps.md) and is decorated with the `[App]` attribute. The attribute uses **named parameters**:
3333

3434
[App(title: "Customers", icon: Icons.Rocket)]
3535
public class CustomersApp : ViewBase
@@ -122,15 +122,6 @@ Align values: TopLeft, TopCenter, TopRight, Left, Center, Right, BottomLeft, Bot
122122

123123
[Layouts](https://docs.ivy.app/onboarding/concepts/layout.md)
124124

125-
### Centered Max-Width Layout
126-
127-
For simpler tools and apps, it's quite nice to give the app a max width and position it in the center:
128-
129-
return Layout.TopCenter()
130-
| (Layout.Vertical().Width(Size.Full().Max(200)).TopMargin(10)
131-
| ...
132-
);
133-
134125
## Text
135126

136127
The Text helper utility is used to create various semantic text elements.
@@ -161,12 +152,12 @@ Ivy.Colors enum has the following values:
161152

162153
Black, White, Slate, Gray, Zinc, Neutral, Stone, Red, Orange, Amber, Yellow, Lime, Green, Emerald, Teal, Cyan, Sky, Blue, Indigo, Violet, Purple, Fuchsia, Pink, Rose, Primary, Secondary, Destructive, Success, Warning, Info, Muted
163154

164-
## Scale
155+
## Density
165156

166-
All widgets support `.Scale(Scale.Small)`, `.Scale(Scale.Medium)`, `.Scale(Scale.Large)`.
157+
All widgets support `.Density(Density.Small)`, `.Density(Density.Medium)`, `.Density(Density.Large)`.
167158
Convenience methods: `.Small()`, `.Medium()`, `.Large()`.
168-
Scale adjusts the overall visual size of a widget (text, padding, etc.).
169-
There is no `ButtonSize` enum — use `Scale` for all widgets.
159+
Density adjusts the overall visual size of a widget (text, padding, etc.).
160+
There is no `ButtonSize` enum — use `Density` for all widgets.
170161

171162
## Size
172163

@@ -182,7 +173,7 @@ Common Size values:
182173
- Size.Px(n) — exact pixels
183174
- Size.Fraction(0.5f) — percentage, Size.Half(), Size.Third()
184175

185-
Size is NOT the same as Scale. Size controls dimensions; Scale controls visual density.
176+
Size is NOT the same as Density. Size controls dimensions; Density controls visual density.
186177

187178
## Event Handling
188179

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Box.Color() Renamed to Box.Background()
2+
3+
The `Color()` attribute and extension methods on the `Box` widget have been renamed to `Background()` to more intuitively reflect what the property controls (the background color of the box).
4+
5+
- Previously: `new Box("Content").Color(Colors.Slate)`
6+
- Now: `new Box("Content").Background(Colors.Slate)`
7+
8+
**Details:**
9+
10+
- The property `Colors? Color` on `Box` is now `Colors? Background`.
11+
- The fluent extension methods `Box.Color(Colors)` and `Box.Color(Colors, float)` are now `Box.Background(Colors)` and `Box.Background(Colors, float)`.
12+
- If you were using `anything.WithCell().Color(...)`, switch to `anything.WithCell().Background(...)`.
13+
14+
**What remains unchanged:**
15+
16+
- `Text.Color(Colors)` and `Icon.Color(Colors)` function as before, changing the text/foreground color.
17+
- `Box.BorderColor()` remains unchanged.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# API Change: Text.InlineCode() to Text.Monospaced()
2+
3+
## Description
4+
The `Text.InlineCode()` factory method and its associated `TextVariant.InlineCode` have been renamed to `Text.Monospaced()` and `TextVariant.Monospaced`, respectively. This renaming is part of an effort to make the UI component library more semantically descriptive, as "monospaced" more accurately describes the visual rendering of the text than "inline code".
5+
6+
## How to Fix
7+
If you encounter errors about `Text.InlineCode` not being found, update your code as follows:
8+
- Change `Text.InlineCode("hello")` to `Text.Monospaced("hello")`
9+
- Change `TextVariant.InlineCode` to `TextVariant.Monospaced`
10+
11+
## Verification
12+
Ensure the UI renders the text in a monospace font by observing the frontend application or checking the generated HTML (`<code class="typography-code">`). No changes to string literals inside text blocks are strictly required unless they directly reference the API as an example.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Removal of `.Value()` API from Input Widgets
2+
3+
As part of Issue #2512, the fluent `.Value<T>()` extension method has been completely removed from all input widgets in the Ivy Framework (e.g., `TextInput`, `SelectInput`, `NumberInput`, etc.).
4+
5+
**Reasoning:**
6+
The `.Value()` method was incorrectly being used to set initial values inline directly on the widget, which conflicts with Ivy's state-driven architecture.
7+
8+
**Migration:**
9+
Initial values should now be strictly managed through the `IState<T>` via the `UseState(initialValue)` hook. They can then be bound to inputs using the respective `.To[InputType]()` methods.
10+
11+
Example (Before):
12+
13+
```csharp
14+
var nameState = UseState("");
15+
var input = new TextInput().Value("John Doe").OnChange(nameState.Set);
16+
```
17+
18+
Example (After):
19+
20+
```csharp
21+
var nameState = UseState("John Doe");
22+
var input = nameState.ToTextInput();
23+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Refactor: Scale to Density
2+
3+
The `Scale` enum and all associated APIs have been renamed to `Density` to avoid ambiguity with chart scales, DPI scaling, etc.
4+
5+
## Migration Guide
6+
7+
- `Ivy.Scale` enum → `Ivy.Density` enum (`Small`, `Medium`, `Large` values are identical)
8+
- `.Scale()` fluent method → `.Density()` on all widgets
9+
- `.Small()`, `.Medium()`, `.Large()` fluent helpers are unchanged
10+
- `Ivy.Scale.Small/Medium/Large``Ivy.Density.Small/Medium/Large`
11+
12+
For a quick migration, you can run a global find-and-replace in your `App` codebase for `.Scale(` -> `.Density(` and `Scale.` -> `Density.`.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
description: Rename input variant enums from plural to singular.
3+
---
4+
# Singular Enum Naming
5+
6+
## Summary
7+
To maintain consistency across the Ivy Framework, 9 input variant enums have been renamed from plural (`*Variants`) to singular (`*Variant`). This aligns them with other standard styling enums like `ButtonVariant`, `BadgeVariant`, and `CalloutVariant`.
8+
9+
## Changes
10+
11+
The following enums have been renamed:
12+
13+
| Old (Plural) | New (Singular) |
14+
|---|---|
15+
| `TextInputVariants` | `TextInputVariant` |
16+
| `SelectInputVariants` | `SelectInputVariant` |
17+
| `NumberInputVariants` | `NumberInputVariant` |
18+
| `FileInputVariants` | `FileInputVariant` |
19+
| `FeedbackInputVariants` | `FeedbackInputVariant` |
20+
| `DateTimeInputVariants` | `DateTimeInputVariant` |
21+
| `ColorInputVariants` | `ColorInputVariant` |
22+
| `CodeInputVariants` | `CodeInputVariant` |
23+
| `BoolInputVariants` | `BoolInputVariant` |
24+
25+
## Refactoring Instructions
26+
27+
For downstream connection projects replacing these usages, you can perform a simple find-and-replace operation across your CSharp files.
28+
29+
1. Search for `TextInputVariants` and replace with `TextInputVariant`
30+
2. Search for `SelectInputVariants` and replace with `SelectInputVariant`
31+
3. Search for `NumberInputVariants` and replace with `NumberInputVariant`
32+
4. Search for `FileInputVariants` and replace with `FileInputVariant`
33+
5. Search for `FeedbackInputVariants` and replace with `FeedbackInputVariant`
34+
6. Search for `DateTimeInputVariants` and replace with `DateTimeInputVariant`
35+
7. Search for `ColorInputVariants` and replace with `ColorInputVariant`
36+
8. Search for `CodeInputVariants` and replace with `CodeInputVariant`
37+
9. Search for `BoolInputVariants` and replace with `BoolInputVariant`
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Toast API Improvements
2+
3+
We have significantly improved the Toast API to reduce misuse and support variants cleanly.
4+
5+
- Previously, the only way to send a destructive toast was to use `client.Error(Exception)`, which was unintuitive when you just wanted to display an error message.
6+
- The `client.Toast(...)` extension methods now include an optional `ToastVariant` parameter.
7+
- The supported variants are `Default`, `Destructive`, `Success`, `Warning`, and `Info`.
8+
9+
**Example:**
10+
11+
```csharp
12+
// Previously you couldn't do this:
13+
client.Toast("Invalid username or password", "Login Failed", ToastVariant.Destructive);
14+
```
15+
16+
**Breaking Changes:**
17+
If you previously injected complex custom structures that relied on the very specific internal shape of `ToasterMessage`, they might need an update to set the new `Variant` property properly, though binary compatibility expects `Default` by default.

0 commit comments

Comments
 (0)