-
Notifications
You must be signed in to change notification settings - Fork 98
Name manager cleanup #544
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
Name manager cleanup #544
Conversation
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.
Pull Request Overview
This PR refactors the name manager component to improve code clarity and add navigation functionality. The changes convert optional props to required props, rename functions for clarity, and implement a feature to navigate to named ranges when clicked.
Key changes:
- Added navigation to named ranges by clicking on them in the list
- Converted optional props to required props throughout the component hierarchy
- Renamed
selectedAreatogetSelectedAreafor better semantic clarity
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Workbook.tsx | Added imports for token parsing, renamed prop, and implemented onNameSelected callback to handle range navigation |
| RightDrawer.tsx | Updated prop interface and forwarded new onNameSelected callback |
| NamedRanges.tsx | Made all props required, renamed props for clarity, changed list item click behavior to navigate instead of edit, and fixed styling indentation |
Comments suppressed due to low confidence (2)
webapp/IronCalc/src/components/RightDrawer/NamedRanges/NamedRanges.tsx:75
- The conditional check
if (!newDefinedName)has been removed on line 75 but was present in the original code. SincenewDefinedNameis now a required prop (not optional), this removal is correct and the check is no longer needed. This comment is informational only - no action required.
if (!newDefinedName) return {};
webapp/IronCalc/src/components/RightDrawer/NamedRanges/NamedRanges.tsx:293
- The conditional check
if (deleteDefinedName)is no longer necessary sincedeleteDefinedNameis now a required prop (line 34). Consider removing this check on lines 293 and 304 for consistency with the prop interface changes.
if (deleteDefinedName) {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
webapp/IronCalc/src/components/RightDrawer/NamedRanges/NamedRanges.tsx
Outdated
Show resolved
Hide resolved
|
Hi @nhatcher. I've reviewed the changes and works well in general but I'm afraid we've lost some functionalities and some things are not properly working:
Thank you! |
We do a trick I am not proud of. Because all of our errors are Strings, we don't have a way to separate a name error from an index error, for instance. What I do in prepend the error with a string that indicates where it comes from.
e2095a0 to
d99278b
Compare
d99278b to
66be0ab
Compare


No description provided.