Skip to content

Conversation

going-confetti
Copy link
Collaborator

@going-confetti going-confetti commented Feb 25, 2025

Closes #363 #507

Description

Add support for data files in parameterization (and custom code) rules. This is the first iteration of the feature.

  • Supported file formats: JSON, CSV
  • Max file size: 10mb
  • CSV files must be comma-separated
  • CSV files should have a header, otherwise the first row will be treated as such
  • nesting is not supported in JSON

Known issues

  1. It's possible to import two files files with the same name, but different file type - I believe it's an edge case and I would like to tackle it later with the addition of file type icons (at the moment, we don't have them). Let me know if you think it's a dealbreaker.
  2. I noticed a regression in the PageHeader component that makes it impossible to view long file names (see screenshot 1). Since it wasn't introduced in this PR, I will fix it separately.

How to Test

  • Import a data-file
  • Use its value in a parameterization rule

Screenshots (if appropriate):

image image image

@going-confetti going-confetti marked this pull request as ready for review February 27, 2025 11:24
@going-confetti going-confetti requested a review from a team as a code owner February 27, 2025 11:24
Copy link
Collaborator

@cristianoventura cristianoventura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

`}
>
<Table.Cell>{file.name}</Table.Cell>
<Table.Cell>Unique item per iteration</Table.Cell>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Random item per iteration is a bit more clear?

Copy link
Collaborator Author

@going-confetti going-confetti Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not random 😬 it picks array values based on scenario.iterationInTest as described here. I'll try to come up with better copy

Comment on lines +114 to +117
<Tooltip
content="Data file is referenced in a rule"
hidden={!isFileInUse}
>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩

<Table.ColumnHeaderCell
key={prop}
uppercase={false}
maxWidth="300px"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added maxWidth to table columns to make sure it will look decent even with longer string values

Copy link
Collaborator

@Llandy3d Llandy3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀 🚀

When importing a data file we don't jump into that view nor show a notification, I would possibly consider the notification of successful data file import 🤔

@going-confetti going-confetti merged commit c0f625b into main Mar 3, 2025
3 checks passed
@going-confetti going-confetti deleted the feat/data-files branch March 3, 2025 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Test data files
3 participants