Skip to content

Commit

Permalink
Merge pull request #2434 from Courey/courey/fix_circular_tooltip_error
Browse files Browse the repository at this point in the history
HOTFIX: Courey/fix circular tooltip error
  • Loading branch information
dakota002 authored Jul 2, 2024
2 parents 67bd135 + 502a6a1 commit 780823a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function GcnCircular({
return (
<AstroDataLinkWithTooltip
to={`/circulars/${value}${searchString}`}
fetch={() =>
fetchFunction={() =>
fetchTooltipData<typeof circularTooltipLoader>('circular', value)
}
label={({ subject, submitter }) => (
Expand All @@ -54,8 +54,10 @@ export function Arxiv({ children, value }: JSX.IntrinsicElements['data']) {
return (
<AstroDataLinkWithTooltip
to={`https://arxiv.org/abs/${value}`}
external
fetch={() => fetchTooltipData<typeof arxivTooltipLoader>('arxiv', value)}
ext
fetchFunction={() =>
fetchTooltipData<typeof arxivTooltipLoader>('arxiv', value)
}
label={({ title, year, authors }) => (
<>
<div>arXiv:{value}</div>
Expand All @@ -75,8 +77,10 @@ export function Doi({ children, value }: JSX.IntrinsicElements['data']) {
return (
<AstroDataLinkWithTooltip
to={`https://doi.org/${value}`}
external
fetch={() => fetchTooltipData<typeof doiTooltipLoader>('doi', value)}
ext
fetchFunction={() =>
fetchTooltipData<typeof doiTooltipLoader>('doi', value)
}
label={({ authors, pub, year, title }) => (
<>
<div>{pub}</div>
Expand All @@ -96,8 +100,10 @@ export function Tns({ children, value }: JSX.IntrinsicElements['data']) {
return (
<AstroDataLinkWithTooltip
to={`https://www.wis-tns.org/object/${value}`}
external
fetch={() => fetchTooltipData<typeof tnsTooltipLoader>('tns', value)}
ext
fetchFunction={() =>
fetchTooltipData<typeof tnsTooltipLoader>('tns', value)
}
label={({ ra, dec, names }) => (
<>
<div>{names.join(', ')}</div>
Expand Down
11 changes: 6 additions & 5 deletions app/routes/circulars.$circularId.($version)/AstroDataContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ export const AstroDataLink = forwardRef(
* position the tooltip if the size changes when the content fills in.
*/
export function AstroDataLinkWithTooltip<T>({
fetch,
fetchFunction,
label,
children,
ext,
...props
}: Omit<Parameters<typeof AstroDataLink>[0], 'ref'> & {
fetch: () => T
fetchFunction: () => T
label: (resolved: Awaited<T>) => ReactNode
external?: boolean
ext?: boolean
}) {
return (
<Tooltip
Expand All @@ -94,7 +95,7 @@ export function AstroDataLinkWithTooltip<T>({
}
>
<Await
resolve={fetch()}
resolve={fetchFunction()}
errorElement={
<>
<div>Not found</div>
Expand All @@ -109,7 +110,7 @@ export function AstroDataLinkWithTooltip<T>({
</div>
}
asCustom={AstroDataLink}
external={Boolean(external)}
external={Boolean(ext)}
>
{children}
</Tooltip>
Expand Down
10 changes: 10 additions & 0 deletions sandbox-seed.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
"submitter": "[email protected]",
"body": "Jada L. Vail, Maggie L. Li (Cornell), Jacob Wise (LJMU), D. A. Perley (LJMU), Anna Y. Q. Ho (Cornell), Eric Burns (LSU), Michael Coughlin (UMN) report: \n\nWe report the identification of a fast-evolving red transient by the Zwicky Transient Facility (ZTF) and Spectral Energy Distribution Machine (SEDM). AT 2023sva is located at the position (J2000) of:\n\nRA = 00:56:59.19 (14.24662 deg)\nDec = +80:08:44.12 (80.14559 deg)\n\nIt was first detected by ZTF on 2023-09-17 09:38:31 UT at r = 17.71 +/- 0.05 mag (MJD=60204.40175) and g = 18.49 +/- 0.06 mag (MJD=60204.44580) as part of the public all-sky survey. ZTF also obtained a non-detection ~2 days prior at r > 20.91 mag (MJD=60202.24319), indicating a fast rise rate of >1.5 mag/day in r. The transient was detected in follow-up Spectral Energy Distribution Machine (SEDM) observations at r = 20.22 +/- 0.08 mag (MJD=60205.48761) and g = 20.73 +/- 0.10 mag (MJD=60205.48597), implying red colors and rapid fading (~2.3 mag/day fade in r). \n\nAT2023sva was also detected by ATLAS (ATLAS23srq) at MJD 60204.43499 and saved to the TNS (Tonry et al. 2023, TNS Report No. 188327). The last ATLAS non-detection was at MJD 60202.48470. The Galactic latitude of AT 2023sva is 17.27 degrees, and the Galactic reddening toward the direction of AT 2023sva is: E(g-r) = 0.249 from Schlafly & Finkbeiner (2011).\n\nThe fast rise, fast decay, red color, and lack of an archival optical counterpart make AT 2023sva a strong candidate afterglow. We identify the temporally and spatially coincident Fermi-GBM trigger bn230916144 / 716527670, initially classified as a GRB with 64% probability at position (J2000) of RA, Dec = 00:26:52.8, +87:43:12. The localization error radius is 21.44 deg. The time of the GBM trigger was 2023-09-16 03:27:46 UT (MJD=60203.14428), 1.3 days prior to the first ZTF detection of AT 2023sva. If the Fermi-GBM trigger is indeed a GRB then we suggest this as the prompt counterpart to AT 2023sva. If the trigger is of another origin, then no identified prompt signal has been reported thus far.\n\nWe encourage spectroscopic follow-up observations.\n\nZTF is supported by the National Science Foundation under Grant No. AST-2034437 and a collaboration including Caltech, IPAC, the Weizmann Institute for Science, the Oskar Klein Center at Stockholm University, the University of Maryland, Deutsches Elektronen-Synchrotron and Humboldt University, the TANGO Consortium of Taiwan, the University of Wisconsin at Milwaukee, Trinity College Dublin, Lawrence Livermore National Laboratories, and IN2P3, France. Operations are conducted by COO, IPAC, and UW.\n\nSED Machine is based upon work supported by the National Science Foundation under Grant No. 1106171.\n"
},
{
"subject": "LIGO/Virgo/KAGRA S240630t: Updated Sky localization",
"eventId": "LIGO/Virgo/KAGRA S240630t",
"submittedHow": "web",
"createdOn": 1719767201026,
"circularId": 36796,
"submitter": "Christopher P L Berry at LVK Collaboration <[email protected]>",
"format": "text/plain",
"body": "The LIGO Scientific Collaboration, the Virgo Collaboration, and the KAGRA Collaboration report:\n\nWe have conducted further analysis of the LIGO Hanford Observatory (H1), LIGO Livingston Observatory (L1), and Virgo Observatory (V1) data around the time of the compact binary merger (CBC) candidate S240630t (GCN Circular 36794). Parameter estimation has been performed using Bilby [1] and a new sky map, Bilby.multiorder.fits,0, distributed via GCN Notice, is available for retrieval from the GraceDB event page:\n\nhttps://gracedb.ligo.org/superevents/S240630t\n\nFor the Bilby.multiorder.fits,0 sky map, the 90% credible region is 670 deg2. Marginalized over the whole sky, the a posteriori luminosity distance estimate is 3161 +/- 841 Mpc (a posteriori mean +/- standard deviation).\n\nFor further information about analysis methodology and the contents of this alert, refer to the LIGO/Virgo/KAGRA Public Alerts User Guide https://emfollow.docs.ligo.org/.\n\n [1] Ashton et al. ApJS 241, 27 (2019) doi:10.3847/1538-4365/ab06fc and Morisaki et al. (2023) arXiv:2307.13380"
},
{
"subject": "GRB230911C: LCOGT Optical Upper Limits",
"submittedHow": "email",
Expand Down

0 comments on commit 780823a

Please sign in to comment.