-
Notifications
You must be signed in to change notification settings - Fork 2.7k
use issue store was not loading up properly , and hence created data … #7533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: preview
Are you sure you want to change the base?
use issue store was not loading up properly , and hence created data … #7533
Conversation
…issues for rendering filters options
WalkthroughThe CycleIssuesMobileHeader component was refactored to wrap its implementation with MobX's observer higher-order component. The original function was renamed, and the exported component is now the observed version. No changes were made to the component's internal logic or behavior. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/mobile-header.tsx (1)
141-150
: Possible index coupling betweenlayouts
andISSUE_LAYOUTS
Inside the map you iterate over
layouts
but referenceISSUE_LAYOUTS[index]
.
If the two arrays diverge in length or ordering, the UI will render the wrong keys/layouts.- <CustomMenu.MenuItem - key={ISSUE_LAYOUTS[index].key} - onClick={() => { - handleLayoutChange(ISSUE_LAYOUTS[index].key); - }} + <CustomMenu.MenuItem + key={layout.key} + onClick={() => handleLayoutChange(layout.key)}This removes the brittle cross-array indexing.
🧹 Nitpick comments (2)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/mobile-header.tsx (2)
25-25
: Prefermobx-react-lite
overmobx-react
for functional-only usage
mobx-react-lite
exposes the sameobserver
HOC but ships a smaller bundle and avoids legacy class-component helpers. Unless the codebase still relies on decorators or the olderinject
, you can safely switch to:-import { observer } from "mobx-react"; +import { observer } from "mobx-react-lite";
27-27
: Add an explicit React type for the componentTyping the component as
React.FC
(or returningJSX.Element
) improves autocomplete and guards against accidentally returning non-JSX values.-const CycleIssuesMobileHeaderComponent = () => { +const CycleIssuesMobileHeaderComponent: React.FC = () => {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/mobile-header.tsx
(2 hunks)
🔇 Additional comments (1)
apps/web/app/(all)/[workspaceSlug]/(projects)/projects/(detail)/[projectId]/cycles/(detail)/mobile-header.tsx (1)
219-220
: Verify downstream imports after re-export pattern changeThe component keeps the same export name, but it is now a wrapped variable rather than a function declaration.
Modules that relied ontypeof CycleIssuesMobileHeader
being a function (e.g. re-using.displayName
) may break. Please run a quick search to confirm no such usage exists.
…issues for rendering filters options
Description
Added observer wrapper for mobile header component . The dropdown issue was due to store not being loaded .
Type of Change
Screenshots and Media (if applicable)
Test Scenarios
Did manual testing reloaded the page on mobile viewport and it worked , before the change it never worked
References
#7525
Summary by CodeRabbit