Skip to content

(typography): fix margins#2020

Closed
ArtemKhvorostianyi wants to merge 8 commits intomainfrom
test-typography
Closed

(typography): fix margins#2020
ArtemKhvorostianyi wants to merge 8 commits intomainfrom
test-typography

Conversation

@ArtemKhvorostianyi
Copy link
Copy Markdown
Collaborator

Screenshot 2026-01-13 at 13 34 45

@ArtemKhvorostianyi
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-01-13 at 13 52 07 Docs -> Views -> Simple User Profile Example

@ArtemKhvorostianyi
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-01-13 at 13 53 31 Mermaid diagrams have no gaps

@ArtemKhvorostianyi
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-01-13 at 13 53 52 Docs -> Demo/Code tab has too big paddings

@ArtemKhvorostianyi
Copy link
Copy Markdown
Collaborator Author

image Too big spacind after title

@ArtemKhvorostianyi
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-01-13 at 13 59 03

Sheets should be fixed too

rorychatt and others added 4 commits January 13, 2026 14:01
* feat(hooks): add UseQuery, UseReducer, UseMemo and simplify hook syntax

Add new React-style hooks:
- UseQuery for async data fetching with caching
- UseReducer for complex state management
- UseMemo for memoized computations
- UseCache for persistent caching

Simplify hook usage by adding ViewBase.Hooks.cs with shortcuts
that allow calling Use* directly instead of Context.Use* or this.Use*.
Updated all CS files and markdown documentation to use the simplified syntax.

* refactor(hooks): remove QueryStrategy enum - only had one value

* refactor(QueryManager): remove unused QueryEntryState enum

* feat(hooks): add KeepPreviousData option for pagination support

When enabled, UseQuery keeps showing previous data while fetching with
a new key instead of clearing and showing loading state. This prevents
UI flicker during list-to-list transitions like pagination.

Adds IsPreviousData flag to QueryResult to indicate when displayed
data is from a previous query while new data is being fetched.

* refactor(hooks): rename IsPreviousData to IsPrevious and reorder QueryResult params

* feat(samples): add KeepPrevious pagination demo to QueryApp

* feat(samples): add Cache tab with clear examples to QueryApp

* fix(hooks): preserve previous value in QueryManager when IsPrevious is set

* fix(samples): use expiration in comparison demo for consistent loading behavior

* feat(core,content): support custom Build methods for rendering

Add automatic detection of Build instance/extension methods for content rendering.
Also, ensure widget tree serialization cache is invalidated on child update.

* feat(app): add MachineId to AppContext and support Device scope

Include MachineId in AppContext and update UseQuery to support Device QueryScope using MachineId for key generation. Prevent QueryScope changes between renders.

* refactor(query): rename QueryManager to QueryService

Refactor QueryManager to QueryService throughout the codebase.
Update related class, method, and option names for consistency.
Also generalize query tag types from string to object for greater flexibility.

* refactor(query): make QueryResult and QueryMutator generic over key

Refactor QueryResult and QueryMutator to accept both value and key generics. Updates all related query/mutation hooks to support explicit key types for improved type safety and flexibility. This is a breaking change for consumers of these APIs.

* refactor(query): add scopedKey handling and unify query key usage

Refactor QueryService and UseQuery to support scopedKey and
serializedScopedKey for more precise and consistent cache keying.

* feat(query): add polling & predicate-based invalidation

Introduce RefreshInterval option for auto-revalidating queries with active subscribers. Add QueryService methods for predicate-based invalidate/revalidate. Update samples with polling and key-based invalidation demos.

* refactor(query): remove TKey from QueryResult and QueryMutator

Simplifies QueryResult and QueryMutator generics by removing TKey.
Updates all relevant usages and APIs to use a single generic TValue,
reducing type complexity and improving code clarity.

* feat(products): add Department entity and refactor product dept

Introduce Department entity, update Product to reference Department by ID,
and refactor related query, form, and seed logic to use Department as a
foreign key. Also enhance query key serialization for complex types.

* refactor(products): improve ProductDetailsBlade layout and queries

Update ProductDetailsBlade to use BladeHelper.WithHeader, adjust skeleton height, and refine query keys. Change Option types in category/department queries to use non-nullable Guid. Fix product mutation/revalidation logic in ProductEditSheet.

* refactor(async-select-input): migrate to UseQuery pattern

Migrate AsyncSelectInput delegates from Task-based async to a hook-based UseQuery pattern.
- Replace AsyncSelectQueryDelegate with AsyncSelectSearchDelegate (renamed) and update signatures to take IViewContext and return QueryResult.
- Update all usages, docs, and examples to match new signatures.
- Refactor AsyncSelectInputView and related UI to use QueryResult for loading/data states.
- BREAKING CHANGE: Existing delegate signatures and usages must be updated. See .releases/Refactors/1.2.6/AsyncSelectInput.md for migration guide.

* feat(products): refactor product list to use query cache

Refactored ProductsApp to use query-based state and cache management.
Introduced IQueryService for cache invalidation by tag, improved list
filtering and revalidation, and unified product/category/department
option queries. Also updated FilteredListView to use local state for
records and loading.

* feat(query): add direct tags parameter to UseQuery hooks

Allows specifying tags directly in UseQuery calls instead of via QueryOptions. This simplifies usage and improves clarity when associating tags with queries. Existing usages updated to prefer the new tags parameter.

* refactor(blades): replace BladeHelper.WithHeader with BladeHeader

Replaces the BladeHelper.WithHeader method with the new BladeHeader
component used inside a Fragment. Updates docs, samples, and all usages.
This is a breaking change�see .releases/Refactors/1.2.6/BladeHeader.md
for migration instructions.

* refactor(blades): rename IBladeController to IBladeService

Rename BladeController and IBladeController to BladeService and IBladeService for consistency with service naming conventions. No API changes; only type names are updated across the codebase and documentation.

* refactor(ui): unify dialog and sheet form rendering

Introduce ToDialog/ToSheet extensions for consistent form and loading UX.
Improve skeletons, async feedback, and code reuse for dialogs/sheets.
Removes legacy builders and simplifies WidgetBase extension methods.

* feat(inputs): show loading state in AsyncSelectInput

Display Loading... placeholder and muted style while async value is loading in AsyncSelectInput.

* refactor(query): rename IsLoading/IsValidating to Loading/Validating

Update QueryResult and related code to use Loading/Validating/Previous
property names instead of IsLoading/IsValidating/IsPrevious for clarity
and consistency. Updates all usages and consumers accordingly.

* feat(query): add UseQuery docs and CRUD demo apps

Add UseQuery concept docs and migration guide. Introduce sample CRUD apps (Products, Categories, Departments) using UseQuery and tag-based cache invalidation. Also, improve AsyncSelectInput loading label handling.

* docs(refactors): update UseQuery.md for revised refactor steps

Streamline refactor guide by removing redundant examples and
clarifying migration steps for UseQuery and related patterns.

* refactor(MetricView): use UseQuery hook for data loading

BREAKING CHANGE: MetricView now requires a Func<IViewContext, QueryResult<MetricRecord>> hook instead of Func<Task<MetricRecord>>. Update usages to use UseQuery for loading and caching metric data. See .releases/Refactors/1.2.6/MetricView.md for migration details.

* refactor(app): replace AppArgs with AppContext in services

Update service retrieval to use AppContext instead of AppArgs
in OAuthFlowView and DefaultSidebarChrome for consistency.

* feat(layout): add individual margin setters to LayoutView

Add TopMargin, BottomMargin, LeftMargin, and RightMargin methods for setting margins independently on LayoutView.

* feat(bar-chart): set vertical as default layout

Change default BarChart layout to vertical and refactor chart extension methods to expression-bodied members for conciseness.

* refactor(effects): rename AfterInit to OnMount throughout codebase

Replaces all references to EffectTrigger.AfterInit with EffectTrigger.OnMount,
and updates related enums, docs, and usages for consistency. Also updates
QueryOptions.RevalidateOnInit to RevalidateOnMount. No functional changes.

* docs(concepts): update and rename Query doc, add key section

Renamed Query.md to 26_Query.md, improved SWR reference, removed best practices/diagrams, and added a placeholder for key explanations. Also updated related links for consistency.

* feat(demos): add ChatApp sample and remove ColorsApp

Introduce a real-time chat demo with username prompt and message
history. Remove the previous ColorsApp sample from demos.

* perf(frontend): add structural sharing and memoization for widget tree updates

Replace cloneDeep with path-based structural sharing to preserve reference
identity for unchanged subtrees. This allows React.memo to skip re-rendering
components whose data hasn't changed.

Changes:
- use-backend.tsx: Replace cloneDeep with clonePathToTarget() that only
  shallow-clones nodes along the path to the changed node. Unchanged
  subtrees keep their references, enabling React to bail out early.

- widgetRenderer.tsx: Wrap rendering in MemoizedWidget with React.memo
  that uses reference equality. When a node reference is unchanged,
  the entire subtree is skipped.

- Update components that filter children by displayName to also check
  for MemoizedWidget's node.type prop (Tabs, Chat, ResizeablePanel,
  SidebarLayout).

Performance characteristics:
- Before: O(n) clone + O(n) React diff for every update
- After: O(d) clone + O(d) diff where d = depth to changed node

This significantly improves update performance for large widget trees,
especially in Chrome mode where only the active AppHost typically changes.

* Update introduction and query documentation; refactor query handling and improve widget configurations

* chore: fix bad docs

* chore: better release refactors

* chore: add migration guide for use static

* chore: correct fversions refs

* chore: update docs

* chore: add notes about removing this

* chore: update use query md

* chore: update use query

* chore: update links to usequery docs

* chore: remove this.

* chore: fix bad links

* chore: remove  oopsie

---------

Co-authored-by: rorychatt <pavel.rinne@gmail.com>
* [Charts]: add SortBy API for X-axis data sorting

* chore: revert changes

* refactor(charts): move SortBy logic to PivotTableBuilder

* fix(charts): improve ApplySorting with robust expression parsing and null checks
@rorychatt rorychatt closed this Jan 13, 2026
@rorychatt rorychatt deleted the test-typography branch January 13, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants