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

fix: target mode visible when disabled #224

Merged
merged 2 commits into from Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -40,4 +40,5 @@ coverage
# logs folder for aio-run-detached
logs


# bundled prompt templates
/data/bundled-prompt-templates.json
9 changes: 1 addition & 8 deletions .husky/pre-commit
@@ -1,11 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# If excel or csv files in the examples/ directory have changed, run the zip examples script
if [ -n "$(git diff --cached --name-only | grep -E 'examples/.*\.(csv|xlsx)$')" ]; then
npm run examples
else
echo "No excel or csv files changed. Skipping 'npm run examples'"
fi

npm test && npm run lint
npm run lint
43 changes: 0 additions & 43 deletions data/bundled-prompt-templates.json

This file was deleted.

Binary file removed examples/target-audiences.xlsx
Binary file not shown.
9 changes: 5 additions & 4 deletions package.json
Expand Up @@ -8,13 +8,14 @@
"preview": "REACT_APP_VERSION=$npm_package_version aio app run",
"grammar": "nearleyc web-src/src/helpers/expressions.ne -o web-src/src/helpers/Parser.generated.js",
"prompts": "node scripts/prompt-generator.js",
"examples": "node scripts/zip-examples.js",
"prebuild": "npm run prompts && npm run grammar",
Copy link
Member

Choose a reason for hiding this comment

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

where is prebuild used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

prebuild is used by build

Copy link
Member

Choose a reason for hiding this comment

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

ah right, thanks! now I remember :)

"build": "REACT_APP_VERSION=$npm_package_version aio app build",
"deploy:app": "npm run grammar && REACT_APP_VERSION=$npm_package_version aio app deploy --no-actions",
"deploy:actions": "aio app deploy --no-web-assets",
"deploy": "npm run grammar && npm run prompts && REACT_APP_VERSION=$npm_package_version aio app deploy",
"deploy:app": "npm run build && REACT_APP_VERSION=$npm_package_version aio app deploy --no-actions --no-build",
"deploy:actions": "npm run build && aio app deploy --no-web-assets --no-build",
"deploy": "REACT_APP_VERSION=$npm_package_version aio app deploy",
"lint": "eslint --quiet 'web-src/src/**/*.js' 'actions/*.js'",
"fix": "eslint --fix --quiet 'web-src/src/**/*.js' 'actions/*.js'",
"pretest": "npm run prompts && npm run grammar",
Copy link
Member

Choose a reason for hiding this comment

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

where is pretest used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pretest is used by test

"test": "jest --collectCoverageFrom='[\"web-src/src/**/*.js\",\"actions/**/*.js\"]' --coverage --passWithNoTests ./actions ./web-src/src ./e2e"
},
"dependencies": {
Expand Down
98 changes: 0 additions & 98 deletions scripts/zip-examples.js

This file was deleted.

2 changes: 1 addition & 1 deletion web-src/src/components/AudienceSelector.js
Expand Up @@ -156,7 +156,7 @@ export function AudienceSelector({

return (
<>
{ (adobeTarget && csv)
{ (isTargetEnabled(adobeTarget) && csv)
&& <DataSourceSelector
label={label}
dataSource={dataSource}
Expand Down