Skip to content

feat: expose react-moment 2 configuration - #7591

Open
harsh21234i wants to merge 5 commits into
reflex-dev:mainfrom
harsh21234i:fix/7100-moment-props
Open

harsh21234i wants to merge 5 commits into
reflex-dev:mainfrom
harsh21234i:fix/7100-moment-props

Conversation

@harsh21234i

@harsh21234i harsh21234i commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Expose the missing react-moment 2.x options through rx.moment.
  • Add rx.moment_provider for shared defaults and pooled timers.
  • Give actionable errors for the removed filter prop and the reported settings and form_at inputs.
  • Update Moment docs and add a package news fragment.

Closes #7100

Tests

  • Moment unit tests: 10 passed.
  • Ruff check, Ruff format, and git diff --check passed.

View guided diff

@harsh21234i
harsh21234i requested review from a team and Alek99 as code owners October 18, 2026 05:37

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 7 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread docs/library/data-display/moment.md Outdated
@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the previous duplication finding is fixed, and no new actionable issues were found.

Summary

Adds more react-moment 2.x options and exposes rx.moment_provider for shared defaults and timers.

  • Moment accepts more of the react-moment 2.x date options.
  • Moment dates can share defaults through a provider.
  • Invalid Moment props now point callers to the right option.

The previous duplication finding is fixed. No new actionable issues were found.

Reviews (5) · Last reviewed commit: "fix: share Moment locale import handling" · Reviewed by Greptile

Comment thread packages/reflex-components-moment/src/reflex_components_moment/moment.py Outdated
Comment thread reflex/__init__.py
Comment thread reflex/__init__.py
@codspeed

codspeed Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 4.07%

⚠️ 21 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

❌ 1 regressed benchmark
✅ 147 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ test_state_access[write_own] 126.1 ms 131.4 ms -4.07%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing harsh21234i:fix/7100-moment-props (7a5aa7f) with main (5ae5dcd)

Open in CodSpeed

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 5 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread tests/units/reflex_components_moment/test_moment.py Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread tests/units/reflex_components_moment/test_moment.py Outdated
Comment thread packages/reflex-components-moment/src/reflex_components_moment/moment.py Outdated
Comment thread packages/reflex-components-moment/src/reflex_components_moment/moment.py Outdated

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsupported Moment options silently become CSS during the react-moment migration

1 participant