Summary
Design of a customised accordion UI component for a specific use case: it lets portfolio managers in asset management view portfolios and positions, model and calibrate trades, and see the effect on cumulative net risk, assets and liabilities, net risk visualisations and the resulting orders.
Problem
Portfolio managers had to switch between two separate applications, Trade Calibration and Modelling Log, to see calibrated trades and the resulting orders. This fragmented workflow caused constant window switching, lost context and slower work.
Objective and constraints
Unify trade calibration and order review in one coherent workflow, without raising cognitive load or exceeding strict screen-size constraints.
- Fixed standard monitor resolution of 1920 × 1024.
- Existing UI patterns did not support conditional multi-panel visibility.
- Critical information had to stay visible during calibration.
Solution
A custom three-panel layout inspired by an accordion component, with bespoke interaction rules:
- The Charts and Trade Calibration panels stay visible during calibration.
- Once calibration is complete, Orders replace the Charts panel.
- Trade Calibration stays visible at all times, for cross-referencing.
This solved the biggest problem with three panels in one browser window on a standard 1920 × 1024 screen: only the panels needed at each point of the portfolio manager’s workflow are in view. That is Charts with Trade Calibration while calibrating, then Trade Calibration with the Order Summary for the final checks.

Outcomes
Where it stands: it was kept as a prototype. In December 2025 I showed it to the product and development teams and one portfolio manager, and the response was overwhelmingly positive. It proved that merging several separate applications into one browser window could work with this three-panel behaviour, and the attendees agreed. There is currently little budget, and so little appetite, to rewrite the three interconnected applications as one, although the pain point of jumping between apps remains.
A senior business analyst was sceptical that three panels could work on a standard 1920 × 1024 monitor. After seeing how the panel behaviour works in the prototype, he said:
It could definitely work.
For the product team:
- Demonstrated how AI-assisted rapid prototyping can accelerate exploration of non-standard UI behaviour.
For users:
- Would eliminate context switching between applications.
- Would reduce window and tab proliferation.
- Would preserve situational awareness while supporting different task phases.
Prompts and results
LLM used: ChatGPT 5.1 (24 Nov 2025). The whole build took 25 minutes, timed as an experiment: typing the prompts, waiting for the results and testing the generated panel behaviour by using it. Below is every prompt, in order, with the code it produced running live. Each result is interactive: click the panel headers and drag the dividers. The prompts are quoted exactly as I typed them, typos included.
Iterations 1 to 3 were test runs. By the end of the third I realised that a more descriptive prompt would probably give a more accurate result first time, with less fine-tuning and fewer prompts. So iteration 4 was a start-over with a full, detailed prompt, and everything after it builds on that.
Show the test runs (iterations 1 to 3)
Iteration 1
Prompt
i need html, css, javascript code to create a 3 section accordion. but the behaviour is customised, so that: at any time, either sections 1 and 2 are open and section 3 is collapsed, or if section 1 header is clicked, the section is collapsed, and section 3 expands from bottom-up, whilst section 2 remains open.
Result
Iteration 2
Prompt
with the custom accordion, can you make the accordion a fixed height of 800px, and the accordion section automatically fill the available height?
Result
Iteration 3
Prompt
i do not want them to be equal height. please update the code
Result
Iteration 4
Prompt
html, css, javascript code for an accordion-like component with custom/specific behaviours:
I need 3 vertically stacked content cards/panels. each panel when all open take up about a third of the vertial screen real-estate of the parent container. This parent container may not be 100% of the vertical height, as it may sit underneath a page header.
I need this parent container that comprises of the 3 card/panels to take up all of the vertical space after the page header is taken into account.
I have specific rules for the 3 card/panels:
card 1 (top) and 2 (middle) can be expanded at the same time but card 3 (bottom) must be minimised, with the card header showing, the card body hidden/collapsed.
If card 3’s header is clicked, then card 1 is collapsed, card 2 remains visible, card 3 expands to reveal the card body.
if card 1 is minimised / collapsed, and its header is clicked, then card 3 is minimised, and card 1’s body is expanded.
If both card 1 and 2 are expanded/visible, then card 3 must be collapsed. if card 2 header is clicked at this point, then collapse card 2’s body, and maximise card 1’s body to fill up the newly available space, pushing down card 2’s header down to sit just above card 3’ header within the parent container.
if card 2’ header is clicked in this minimised state, and card 1 is expanded, then revert to the previous state.
Result
Iteration 5
Prompt
I forgot to complete a few more requirements, so please redo the previous instructions, BUT with these ADDITIONAL rules:
If both card 2 and 3 are expanded/visible, then card 1 must be collapsed. if card 2 header is clicked at this point, then collapse card 2’s body, and maximise card 3’s body to fill up the newly available space, pushing up card 2’s header up to sit just below card 1s header within the parent container.
if card 2’ header is clicked in this minimised state, and card 3 is expanded, then revert to the previous state.
One more thing, can you make the expanding and collpasing stated animated to slide up or down?
Result
Iteration 6
Prompt
building from that you’ve just done, are you able to create a small 3px horizontal space dividing each vertically stacked car/panel, and make these horizontal spaces, a grab handle to allow users to drag up or down to dynamically resize the neighbouring cars/panels? Any expanding and collapsing behaviour of the card by clicking their respective headers need to expand to any changed panel size from the dragging to resize functionality.
Result
Iteration 7
Prompt
that renders well, but unfortunately, the expanding and collpasing of the card no longer work, nor the drag to resize functionality, although the cursor does display the resize cursor. can you re-examine and fix?
Result
Iteration 8
Prompt
make each card body have a vertical scrollbar if content exceeds viewable height - i think its the overflow-y attribute with auto value.
Result
Final prototype
Iteration 9: the prototype after the last prompt, with screenshots of the real Charts, Trade Calibration and Orders panels dropped in as content.