Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generated tabs are broken in latest update #1972

Open
fboerman opened this issue May 4, 2024 · 6 comments
Open

generated tabs are broken in latest update #1972

fboerman opened this issue May 4, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@fboerman
Copy link

fboerman commented May 4, 2024

Steps To Reproduce

generate tabs from a query like this:

<Tabs>
{#each hubs as hub}
<Tab label="{hub.hub}">

<LineChart
  data={np_combined.where(`hub = '${hub.hub}' `)}
  x=mtu
  y={["NP", "min_np", "max_np"]}
  step=true
  chartAreaHeight=300
  yFmt={`0 "MW"`}
  title="Net Position of {hub.hub} in CORE for {params.businessday} within its theoretical boundaries"
  colorPalette={amunColors}
/>

<LineChart
  data={np_util.where(`hub = '${hub.hub}' `)}
  x=mtu
  y=util_pct
  step=true
  title="Net Position of {hub.hub} in CORE for {params.businessday} as percentage of min/max"
  sort=false
  yMin=0
  yMax=1
  yFmt="pct2"
/>

</Tab>
{/each}
</Tabs>

Environment

  • Node version (node -v): v20.12.2
  • npm version (npm -v): 10.5.2
  • OS: archlinux
  • Browser: firefox
  • Database: postgres (but probably unrelated)

Expected Behavior

tabs to generate with names

Actual Behaviour

tabs look like below and the content of all tabs is generated below eachother
Screenshot_select-area_20240504151858

Workarounds

none that I know of so far

@fboerman fboerman added bug Something isn't working to-review Evidence team to review labels May 4, 2024
@fboerman
Copy link
Author

fboerman commented May 4, 2024

update after talking to @hughess it probably has to do with not waiting for query result. because generating tabs in a loop like this works:

<Tabs>
{#each ['one', 'two'] as tab}
<Tab label={tab}>

  content {tab}

</Tab>
{/each}
</Tabs>

@archiewood
Copy link
Member

Note that you should always use {#each} blocks wrapped in newlines like this

<Tabs>

{#each ['one', 'two'] as tab}

<Tab label={tab}>

  content {tab}

</Tab>

{/each}

</Tabs>

reason: markdown is newline sensitive

@fboerman
Copy link
Author

fboerman commented May 4, 2024

hi @archiewood that doesnt actually fix my issue so I dont understand why you are closing this? the bug still exists

@archiewood archiewood reopened this May 4, 2024
@archiewood
Copy link
Member

Sorry, didn't mean to close, hit the wrong button on mobile

@fboerman fboerman changed the title generated tabs are not broken in latest update generated tabs are broken in latest update May 4, 2024
@ItsMeBrianD
Copy link
Member

Should follow up post-release to confirm, but this should be addressed by the fixes in #1980

@mcrascal mcrascal removed the to-review Evidence team to review label May 15, 2024
@mcrascal
Copy link
Member

@ItsMeBrianD - still occurring on next afaict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants