Render Appropriately in Embedded Mode #1260
Conversation
Looking at this now. |
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.
Nice and complete implementation of a "laundry list" feature with lots of concerns. 👍
Report an issue | ||
</a> | ||
{embed ? ( | ||
<div /> |
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.
Curious about this empty div. Traditionally we return null
from our ternary expressions to skip rendering a component.
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.
This is to maintain styling - having no component here caused the search/reset buttons to shift left. I could rewrite the styling code explicitly instead, if desired
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.
2 cents: As a rule of thumb, best to avoid spacer divs and make the styling resilient to (expected) DOM variations. But not a huge deal here, and it should disappear anyway when we do a more holistic update to the search form to accommodate additional functionality.
👀 |
Heads up, I'm seeing a console warning when I open the facility detail view – both in embed and regular mode. But it's also present on
|
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.
👍 Works as described.
3922ad5
to
ac3f8c8
Compare
When running in embedded mode, hide the header and footer, the contributor filter, the report link, the Guide tab, the OAR sidebar header, and the facility detail actions; make the contributor links into text; add a 'open in OAR' link; and remove the 'embed' parameter from 'share this search'.
ac3f8c8
to
e62483e
Compare
Overview
When OAR is acting as an embedded map, various components should be hidden or behave differently.
Page
Sidebar:
target=
)Connects #1256
Demo
Testing Instructions
./scripts/server
in vagrantChecklist
fixup!
commits have been squashed