Mirrored from GitHub github.com/roostorg/osprey
0

Configure Feed

Select the types of activity you want to include in your feed.

[osprey-ui] fix Safari "See details" popup auto-close (#289)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

author
hailey
co-author
coderabbitai[bot]
committer
GitHub
date (May 29, 2026, 10:23 AM -0700) commit a3aa0b7b parent 615ac019
+3 -30
-14
osprey_ui/package-lock.json
··· 32 32 "react": "^18.2.0", 33 33 "react-dom": "^18.2.0", 34 34 "react-infinite-scroller": "1.2.4", 35 - "react-new-window": "0.1.2", 36 35 "react-router": "5.2.0", 37 36 "react-router-dom": "5.2.0", 38 37 "react-scripts": "5.0.1", ··· 18220 18219 "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", 18221 18220 "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", 18222 18221 "license": "MIT" 18223 - }, 18224 - "node_modules/react-new-window": { 18225 - "version": "0.1.2", 18226 - "resolved": "https://registry.npmjs.org/react-new-window/-/react-new-window-0.1.2.tgz", 18227 - "integrity": "sha512-KfjR6QupGf4UZCK7ittUE7r53eOax9mw0ODQIhDSxu4dzxWgeE9y95MRs8Dr9m/F7Plm3LUvccO5yGbg3619yA==", 18228 - "license": "MIT", 18229 - "dependencies": { 18230 - "prop-types": "^15.7.2" 18231 - }, 18232 - "peerDependencies": { 18233 - "react": "^16.0.0", 18234 - "react-dom": "^16.0.0" 18235 - } 18236 18222 }, 18237 18223 "node_modules/react-refresh": { 18238 18224 "version": "0.11.0",
-1
osprey_ui/package.json
··· 27 27 "react": "^18.2.0", 28 28 "react-dom": "^18.2.0", 29 29 "react-infinite-scroller": "1.2.4", 30 - "react-new-window": "0.1.2", 31 30 "react-router": "5.2.0", 32 31 "react-router-dom": "5.2.0", 33 32 "react-scripts": "5.0.1",
+3 -15
osprey_ui/src/components/event_stream/EventStreamCard.tsx
··· 1 1 import * as React from 'react'; 2 2 import { Empty } from 'antd'; 3 - import NewWindow from 'react-new-window'; 4 3 import { useParams } from 'react-router-dom'; 5 4 6 5 import useApplicationConfigStore from '../../stores/ApplicationConfigStore'; ··· 26 25 } 27 26 28 27 const EventStreamCard = ({ eventDetails, selectedFeatures, featureLocations, isListView }: EventStreamCardProps) => { 29 - const [showWindow, setShowWindow] = React.useState(false); 30 28 const { entityId, entityType } = useParams<EntityViewParams>(); 31 29 const decodedEntityId = entityId != null ? decodeURIComponent(entityId) : null; 32 30 const decodedEntityType = entityType != null ? decodeURIComponent(entityType) : null; 33 31 const featureNameToEntityTypeMapping = useApplicationConfigStore((state) => state.featureNameToEntityTypeMapping); 32 + const eventUrl = `${document.location.origin}/events/${encodeURIComponent(eventDetails.id)}`; 34 33 35 34 const handleShowWindow = () => { 36 - setShowWindow(true); 37 - }; 38 - 39 - const handleWindowClose = () => { 40 - setShowWindow(false); 35 + window.open(eventUrl, '_blank', 'width=800,height=800'); 41 36 }; 42 37 43 38 const renderDescriptionBlock = (features: readonly string[]) => { ··· 85 80 ); 86 81 }; 87 82 88 - const eventUrl = `${document.location.origin}/events/${eventDetails.id}`; 89 - 90 83 const cardTitle = ( 91 84 <div className={styles.cardTitle}> 92 85 <Feature ··· 115 108 <div className={styles.card}> 116 109 <div className={styles.cardHeader}> 117 110 {cardTitle} 118 - <OspreyButton onClick={handleShowWindow}> 119 - See Details 120 - {showWindow && ( 121 - <NewWindow url={eventUrl} onUnload={handleWindowClose} features={{ width: 800, height: 800 }} /> 122 - )} 123 - </OspreyButton> 111 + <OspreyButton onClick={handleShowWindow}>See Details</OspreyButton> 124 112 </div> 125 113 <div>{renderContent()}</div> 126 114 </div>