Skip to content

feat: Add more ui components - #838

Open
aXenDeveloper wants to merge 2 commits into
canaryfrom
feat--Add-more-ui-components
Open

aXenDeveloper wants to merge 2 commits into
canaryfrom
feat--Add-more-ui-components

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

@github-actions github-actions Bot added the 💡 Feature A new feature label Oct 2, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ceed7456be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +331 to +333
case "ArrowDown":
event.preventDefault();
focusOption(panel, level, Math.min(count - 1, index + 1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compute keyboard movement from enabled options

When a cascader level contains a disabled option before the focused option, index and count refer to the unfiltered column while focusOption indexes a list with disabled buttons removed. Arrow Up/Down therefore skips enabled choices or focuses nothing; for example, with [disabled, A, B], Arrow Down on A requests filtered index 2 and cannot move to B. Derive the current position and bounds from the enabled-option list.

Useful? React with 👍 / 👎.

Comment on lines +85 to +87
} catch {
setOverride(current => (current === attempt ? previous : current));
toast.error(t("reorder_failed"), {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Roll back concurrent reorders to confirmed state

If a user performs a second drop before the first onReorder promise settles, previous for the second request is the first optimistic override. When the first request rejects while the second is pending and the second then rejects, this catch restores that already-failed override, leaving the table visibly reordered even though neither change was saved. Serialize reorders or track the last confirmed order separately from pending optimistic attempts.

Useful? React with 👍 / 👎.

Comment on lines +7 to +11
const readRaw = (key: string): null | string => {
try {
return window.localStorage.getItem(key);
} catch {
return memoryFallback.get(key) ?? null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Read the in-memory value after storage writes fail

When setItem or removeItem throws but getItem still works—such as when storage is full—writeRaw updates memoryFallback, but the dispatched update immediately calls readRaw, which returns the stale local-storage value and never consults the fallback. In that common failure mode the setter or reset appears to do nothing, contrary to the intended session-memory fallback; keys whose writes fail need to read from the fallback thereafter.

Useful? React with 👍 / 👎.

Comment on lines +23 to +26
export const numberPlaces = (value: number) => {
const length = String(Math.trunc(Math.abs(value))).length;

return Array.from({ length }, (_, index) => 10 ** (length - index - 1));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Render fractional counter values instead of truncating them

Whenever Counter uses a fractional defaultValue, controlled value, or step (for example step={0.5}), its state and screen-reader value become 0.5, but numberPlaces truncates it and DigitRoller floors each place, so the visible control still shows 0. This makes the displayed value disagree with the value submitted through onValueChange; either render fractional places or explicitly normalize the counter to integers.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c965f85d71

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

React.useState(defaultValue);
const value = valueProp === undefined ? uncontrolledValue : valueProp;
const selectedPath = React.useMemo(
() => (value ? findCascaderPath(options, value) : []),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat empty strings as valid cascader values

When an option has value: "", selecting it successfully commits the empty string, but this truthiness check immediately turns its selectedPath back into an empty array. The trigger therefore continues to show the placeholder, the option is not marked selected, and the clear control is unavailable even though null—not an empty string—is the component's documented empty state. Check value !== null instead.

Useful? React with 👍 / 👎.

return () => {
observer.disconnect();
};
}, [elementRef, isFrozen, root, rootMargin, thresholdKey]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reobserve when the ref target changes

When the observed element mounts conditionally or the same ref is moved to a replacement node, the ref object's identity and every dependency here remain unchanged, so this effect does not run again. If the first effect saw null, no observer is ever created; if it saw the old node, the hook keeps observing that detached node. Track the actual target through a callback/state ref or otherwise rerun the subscription when elementRef.current changes.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💡 Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant