Skip to content

FIREFLY-1942: Add a new box mode to Search Select Tools in EmbeddedPositionSearchPanel#1925

Merged
jaladh-singhal merged 2 commits intodevfrom
FIREFLY-1942-rotation-rect-select
Mar 30, 2026
Merged

FIREFLY-1942: Add a new box mode to Search Select Tools in EmbeddedPositionSearchPanel#1925
jaladh-singhal merged 2 commits intodevfrom
FIREFLY-1942-rotation-rect-select

Conversation

@jaladh-singhal
Copy link
Copy Markdown
Member

@jaladh-singhal jaladh-singhal commented Mar 25, 2026

Fixes FIREFLY-1942

  • Updated the EmbeddedPositionSearchPanel to support a "Box" search type and added the BoxSearchInputFields component for user input of box size and rotation
  • Modified the search selection drawing logic in SearchSelectTool to support boxes: added drawSearchSelectionTransformBox for rendering box shapes with rotation
  • updated event dispatching and rendering functions to handle the new box type in VisualSearchUtils and TargetHiPSPanel to support bidirectional update between HiPS image + drawing layer and box UI inputs.

Other Improvements

  • Enhanced the QuantityInputField to allow passing additional props for customizing the numeric input, supporting features like increment/decrement controls for rotation.
  • Added clarifying code comments
  • Fixed a regression bug that was failing Spectral Image search tab to load in SPHEREx rebased from dev

Also see IFE PR: https://github.com/IPAC-SW/irsa-ife/pull/460

Testing

Enable direction and grid layers on HiPS for testing. Zoom in the HiPS to FOV < 8 deg since there's upper limit on box size. Then:

  1. Draw a rect selection area - it should convert to search select box (yellow box) and UI inputs should be populated
  2. Change box UI inputs - it should redraw the box as per inputs. Use arrows on rotation field to quickly see effect of rotation

Do above testing for target at a 1) random location (34, -56), 2) near equator (anything 0), 3) at poles (0 90, 0 -90). Also try changing projection (spherical/aitoff), and coordinate system (galactic/equatorial) of the HiPS.

Regression Testing

Check if the following are working as before:

  • DCE cone and polygon mode
  • Search refinement tool on FITS images (cone and polygon)

@jaladh-singhal jaladh-singhal added this to the 2026.1 milestone Mar 25, 2026
@jaladh-singhal jaladh-singhal self-assigned this Mar 25, 2026
@jaladh-singhal jaladh-singhal added enhancement UI Client side UI changes not related to any of the visualizers overlay-drawing overlay drawing for images or HiPS labels Mar 25, 2026
const rotAxisWp = plot.attributes[PlotAttribute.USER_SEARCH_BOX_AXIS_WP];
if (!wp || !wpAry) return [];

// TODO: draw rotate and resize handles when the box is selected (similar to footprint selection behavior)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@robyww I plan to do this in another ticket in the future - will make one when merging this one.

Comment thread src/firefly/js/visualize/ui/VisualSearchUtils.js Outdated
@jaladh-singhal jaladh-singhal force-pushed the FIREFLY-1942-rotation-rect-select branch from 60df5a2 to 2a92133 Compare March 25, 2026 23:44
Copy link
Copy Markdown
Contributor

@robyww robyww left a comment

Choose a reason for hiding this comment

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

You did a really go job on this! I know it was a lot of effort. The code is clean and I like the additional cleanup and documentation you did.

I left a few very small comments but after you clean that up I think it is ready.

Comment thread src/firefly/js/visualize/ui/TargetHiPSPanel.jsx
Comment thread src/firefly/js/visualize/ui/TargetHiPSPanel.jsx Outdated
Comment thread src/firefly/js/visualize/ui/TargetHiPSPanel.jsx Outdated
Comment thread src/firefly/js/visualize/draw/DrawLayer.js
Comment thread src/firefly/js/visualize/ui/VisualSearchUtils.js Outdated
Comment thread src/firefly/js/visualize/ui/VisualSearchUtils.js Outdated
Comment thread src/firefly/js/visualize/ui/VisualSearchUtils.js Outdated
Comment thread src/firefly/js/ui/dynamic/DynComponents.jsx Outdated
FIREFLY-1942: Update signature of updatePlotOverlayFromUserInput()

Add code comments for clarity

FIREFLY-1942: Rename selection source constant for search refinement tool

FIREFLY-1942: Add/update comments in drawing layer files for clarity

FIREFLY-1942: Add Box search input fields and search select tool for HiPS

FIREFLY-1942: Add a useBox plot attribute and change projection center in convertBoxToSelection

FIREFLY-1942: Use constants for min and max size values in EmbeddedPositionSearchPanel

FIREFLY-1942: Add rectangle rotation angle in getDetailsFromSelection

FIREFLY-1942: Refactor BoxSearchInputFields to use dynamic labels and improve layout

FIREFLY-1942: Add SelectAreaForEmbedded in Box search input fields

FIREFLY-1942: Add numeric inc/dec controls to rotation field

FIREFLY-1942: Add rotation axis world point to selection attributes and refactor related calculations

FIREFLY-1942: Fix box drawing errors at poles by computing polygon corners

FIREFLY-1942: clarify getDetailsFromSelection produce all WorldPts in Equatorial

FIREFLY-1942: Cleanup todos and logs

FIREFLY-1942: Refactor updateUIFromPlot by extracting each case into separate functions

FIREFLY-1942: Make box UI input more overridable

FIREFLY-1942: Apply feedback from the PR

FIREFLY-1942: Add logs for box DL

FIREFLY-1942: Fix search summary not showing when single toggle option

FIREFLY-1942: Update convertBoxToSelection to use wpAry

FIREFLY-1942: Remove box from DCE
@jaladh-singhal jaladh-singhal force-pushed the FIREFLY-1942-rotation-rect-select branch from 1019ba9 to ffe89b6 Compare March 30, 2026 22:50
@jaladh-singhal jaladh-singhal force-pushed the FIREFLY-1942-rotation-rect-select branch from ffe89b6 to 4ea7e4e Compare March 30, 2026 22:51
@jaladh-singhal jaladh-singhal merged commit f49cb89 into dev Mar 30, 2026
@jaladh-singhal jaladh-singhal deleted the FIREFLY-1942-rotation-rect-select branch March 30, 2026 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement overlay-drawing overlay drawing for images or HiPS UI Client side UI changes not related to any of the visualizers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants