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

315 - Add GA custom event for Dataset to DOM elements #322

Merged
merged 230 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
230 commits
Select commit Hold shift + click to select a range
d3c087e
add text for QN skipped
nozomione Nov 6, 2023
183e374
(fix) update the moethod to includes in compendai download dropdown
nozomione Nov 6, 2023
cf71eed
(edit) integrate Hubspot API for signup form
nozomione Nov 6, 2023
6393cc6
create the GithubAnchor component and add to the global header
nozomione Nov 6, 2023
24a9125
(edit) add the info message to certain organism in compendia search box
nozomione Nov 6, 2023
863a883
(edit) make the info message color black by default
nozomione Nov 6, 2023
9170019
(edit) reverse the chevron icons for closed and opened states in adva…
nozomione Nov 6, 2023
7d7e685
(edit) show github anchor on large devices only
nozomione Nov 6, 2023
3505b72
Merge branch 'nozomione/236-add-ALSF-github-repo-link-to-global-heade…
nozomione Nov 6, 2023
bc8ce67
Merge branch 'nozomione/237-display-info-message-to-certain-organism'…
nozomione Nov 6, 2023
52d9921
Merge branch 'nozomione/250-correcrt-text-color-for-non-linked-info-m…
nozomione Nov 6, 2023
148e795
(edit) define the filterOrders state in SearchManagerContext and add …
nozomione Nov 7, 2023
56fe4eb
(edit) add unformatted filter keys to the SearchFilter component and …
nozomione Nov 7, 2023
f727038
(fix) resolve the bugs on the pagination's next and previous buttons …
nozomione Nov 7, 2023
5e51950
(fix) stop a query string update on clear term button click
nozomione Nov 7, 2023
6fc1d87
(fix) correct the typo in compendia rna-seq sample compendia, update …
nozomione Nov 7, 2023
0d395a9
(fix) make the show label aligned with radio buttons, fix the word wr…
nozomione Nov 7, 2023
538c678
(fix) prevent unnecessary url update, add updatePage as a default prop
nozomione Nov 7, 2023
d4230f4
Merge branch 'nozomioneone/260-fix-pagination-bugs-on-search-results-…
nozomione Nov 7, 2023
9b4ca76
Merge branch 'nozomione/261-fix-clear-term-button-on-search-box' into…
nozomione Nov 7, 2023
5468a8c
Merge branch 'nozomione/262-fix-typo-in-rna-seq-sample-compendia' int…
nozomione Nov 7, 2023
359bafe
(fix) change the css value for word break to 'break-word' instead of …
nozomione Nov 7, 2023
9410044
(rename) rename tubey svg files and fix its imprts, and make minor ad…
nozomione Nov 8, 2023
ef21667
create the SamplesTableError component and use it in the SamplesTable…
nozomione Nov 8, 2023
0515896
(rename) rename env name 'API_PATH' to 'API_HOST' in Vercel and adjus…
nozomione Nov 9, 2023
776d4e2
(move) move the directory components/Error/* to components/shared/Err…
nozomione Nov 9, 2023
d201ed7
(rename) rename the TwoColumns component to 'Template' and adjust its…
nozomione Nov 9, 2023
aec9029
(minor: style) adjust the template to support the column direction fo…
nozomione Nov 9, 2023
3ae3a09
Merge 'dev' branch into nozomioneone/260-fix-pagination-bugs-on-searc…
nozomione Nov 9, 2023
136b8db
Merge branch 'nozomioneone/260-fix-pagination-bugs-on-search-results-…
nozomione Nov 9, 2023
85451ab
Merge branch 'nozomione/261-fix-clear-term-button-on-search-box' into…
nozomione Nov 9, 2023
6cf921b
(fix) map over the tabs for the compendia nav links in GlobalNav
nozomione Nov 9, 2023
a6ae3ac
(fix) map over the tabs for menuItems in NavDropDown
nozomione Nov 9, 2023
148f0c0
Merge branch 'dev' into nozomione/262-fix-typo-in-rna-seq-sample-comp…
nozomione Nov 9, 2023
54d7620
Merge branch 'nozomione/262-fix-typo-in-rna-seq-sample-compendia' int…
nozomione Nov 9, 2023
12f21ab
Merge branch 'nozomione/249-align-show-label-in-experiments-view-tab'…
nozomione Nov 9, 2023
9728c1e
Merge branch 'nozomione/267-add-word-break-to-platform-names-in-searc…
nozomione Nov 9, 2023
4053b7f
Merge branch 'nozomione/220-error-handling-for-samples-table-resource…
nozomione Nov 9, 2023
e821254
(edit) refactor fetchAsync and fetchSearch helpers and adjust the Sea…
nozomione Nov 9, 2023
681cbdb
(minor: style) increase a max width value in Custom504
nozomione Nov 9, 2023
ad0eecf
(edit) add the error handling to compendia download box
nozomione Nov 9, 2023
10e0f69
(clean up) clean up the message propery (used when testing and forgot…
nozomione Nov 9, 2023
75ed651
Merge branch 'nozomione/271-error-handling-for-search-results-page' i…
nozomione Nov 9, 2023
6e2ac06
(minor: style) increase the heading and pharagraph font sizes in Temp…
nozomione Nov 10, 2023
f8c5dce
Merge branch 'nozomione/271-error-handling-for-search-results-page' i…
nozomione Nov 10, 2023
f326a50
Merge branch 'dev' into nozomione/271-error-handling-for-search-resul…
nozomione Nov 10, 2023
ed720c6
(edit) format the 'rna-seq' name to be rendered as 'RNA-seq' instead …
nozomione Nov 13, 2023
95c61ed
Merge branch 'dev' into nozomione/279-fomat-rna-seq-name-in-ui-for-te…
nozomione Nov 13, 2023
01a996a
Merge branch 'dev' into nozomione/170-implement-error-handling-for-co…
nozomione Nov 13, 2023
0b16a1d
Merge branch 'dev' into nozomione/220-error-handling-for-samples-tabl…
nozomione Nov 13, 2023
2fed238
(edit) include required options in the one-off experiment download mo…
nozomione Nov 14, 2023
8ba8629
Merge branch 'nozomione/170-implement-error-handling-for-compendia-pa…
nozomione Nov 14, 2023
20b0aa4
Merge branch 'nozomione/271-error-handling-for-search-results-page' i…
nozomione Nov 14, 2023
08bde8a
Merge branch 'nozomione/220-error-handling-for-samples-table-resource…
nozomione Nov 14, 2023
025e903
(minor) store the RNA-SEQ string to a variable
nozomione Nov 14, 2023
8e6a0c5
(edit) add the methods for download options in useDatasetManager
nozomione Nov 14, 2023
4b933e6
(edit) use the download options methods in the download options form …
nozomione Nov 14, 2023
f857cdf
(typo) rename 'change' to 'onChange' for consistency in handleUpdateD…
nozomione Nov 14, 2023
9f47a1e
(clean up) remove the old props from Column instances
nozomione Nov 15, 2023
5dc0751
(fix) adjust the style to display the Download Now button correctly a…
nozomione Nov 15, 2023
344f07b
(edit) define the state for the regenerate dataset and modify the upd…
nozomione Nov 15, 2023
2c74950
(edit) separate the handleUpdateDownloadOptions and handleChange to p…
nozomione Nov 15, 2023
b1be717
(edit) render the latest state of a regenerated dataset in UI per dow…
nozomione Nov 15, 2023
36d0f54
(typo) fix a typo in sitemap.config
nozomione Nov 15, 2023
9c1694c
(fix) fix the parse error at build
nozomione Nov 15, 2023
6b91dc9
(typo) fix a tupo for the regeneratedDataset state
nozomione Nov 15, 2023
8da4d1a
(fix) clean up the unnecessesary logical OR
nozomione Nov 15, 2023
7016110
Merge 'dev' branch into (nozomione/271-error-handling-for-search-resu…
nozomione Nov 15, 2023
c648515
(fix) merge
nozomione Nov 15, 2023
3a7b4c8
(fix) remove old file
nozomione Nov 15, 2023
6ae6122
Merge branch 'nozomione/271-error-handling-for-search-results-page' i…
nozomione Nov 15, 2023
80e2adb
Merge branch 'nozomione/170-implement-error-handling-for-compendia-pa…
nozomione Nov 15, 2023
cb0e2cd
Merge branch 'nozomione/279-fomat-rna-seq-name-in-ui-for-technology' …
nozomione Nov 15, 2023
21e3beb
Merge branch 'nozomione/282-fix-include-required-options-in-one-off-e…
nozomione Nov 15, 2023
af023e7
Merge branch 'nozomione/278-show-qn-skipped-badge-on-rna-seq-experime…
nozomione Nov 15, 2023
e29c990
Merge branch 'nozomione/285-fix-download-button-style' into nozmoione…
nozomione Nov 15, 2023
3e1a56b
(typo) correct a typo in the file name AdvancedOptions and fix the im…
nozomione Nov 15, 2023
c8956d0
Merge branch 'nozomione/282-fix-include-required-options-in-one-off-e…
nozomione Nov 16, 2023
3f7302a
Merge 'dev' branch into nozomione/278-show-qn-skipped-badge-on-rna-se…
nozomione Nov 20, 2023
accc9b6
Merge branch 'nozomione/278-show-qn-skipped-badge-on-rna-seq-experime…
nozomione Nov 20, 2023
cb8dd6e
Merge branch 'nozomione/285-fix-download-button-style' into nozmoione…
nozomione Nov 20, 2023
f94f43c
(merge) resolve conflict
nozomione Nov 20, 2023
8c15640
Merge branch 'dev' into nozomione/292-fix-dataset-loader-for-polling-…
nozomione Nov 20, 2023
19a3b0a
(edit) add a new stat processingDatasets for the processing datasets …
nozomione Nov 21, 2023
f8291c7
(edit) add a check for null case for datasetId to startProcesingDatas…
nozomione Nov 21, 2023
ad039e7
create the useResourceLoader hook (rewrite of useOneOffExperiment) fo…
nozomione Nov 21, 2023
706548d
(edit) use the useResourceLoader hook in [dataset_id] and adjust the …
nozomione Nov 21, 2023
b45ba3d
(optimize) optimize and clean up, and make minor adjustments
nozomione Nov 21, 2023
8bc104a
(edit) add error handling to dataset/download page
nozomione Dec 4, 2023
cb0d1ac
(edit) add env for slack webhook url in next.config
nozomione Dec 6, 2023
722fa65
add the slack webhook script for the request data (refactored refineb…
nozomione Dec 6, 2023
03484c8
add the API route (endpoint: /api/data-requests) for the data request
nozomione Dec 6, 2023
09ab51e
(edit) complete the submit handler in the RequestSearchForm component…
nozomione Dec 6, 2023
e9f35c0
(edit) add the state for requested experiment in RefinebioContext for…
nozomione Dec 6, 2023
568f87c
(edit) complete the submit handler in the RequestSearchForm component…
nozomione Dec 6, 2023
5d3d891
(edit) add the intermediary page AcccesionCode in pages/[accession_co…
nozomione Dec 6, 2023
57f0ff1
(temp) temporarily add the test webhook url for the CCDL test channel…
nozomione Dec 6, 2023
639e2d4
Merge branch 'nozomione/290-set-up-slack-webhook-for-search' into noz…
nozomione Dec 6, 2023
b1423e6
(edit) add env for hubspot API key and list ID in next.config
nozomione Dec 6, 2023
a30409e
add the HubSpot API script for the request data and use it in api/dat…
nozomione Dec 7, 2023
99ba3be
(minor) add a constant for Hubspot API URL
nozomione Dec 7, 2023
ca1cee0
(migration to v3) add env vars for hubspot accession token and ILS li…
nozomione Dec 8, 2023
321e3cb
(migration to v3) migrate the hubspot script to v3 from v1 and optimize
nozomione Dec 8, 2023
5f454fe
(edit) adjust pages/api/data-requests
nozomione Dec 8, 2023
1b64c2c
(typo) fix a typo in staging env var name for the HubSpot access token
nozomione Dec 8, 2023
434e5e2
(edit) add the concatenation of the data request details property's n…
nozomione Dec 9, 2023
0345b39
(optimize) destructure the request values for readability
nozomione Dec 9, 2023
77985c1
Merge branch 'nozomione/290-set-up-slack-webhook-for-search' into noz…
nozomione Dec 9, 2023
89a5b89
Merge branch 'nozomione/291-set-up-slack-webhook-for-experiment' into…
nozomione Dec 9, 2023
0f84a61
(optimize) destructure the request values for readability
nozomione Dec 9, 2023
58a8054
(minor) fix the email update prop
nozomione Dec 11, 2023
0596d0f
(edit) add env vars for Github endpoint and token in next.config
nozomione Dec 11, 2023
74e45be
add the Github API script for the request data and adjust api/data-re…
nozomione Dec 11, 2023
eb41e71
(typo) replace query with accessionCode
nozomione Dec 11, 2023
45fdc40
define env var for development in docker container (for GA4 local imp…
nozomione Dec 21, 2023
5c29e45
add the env var for GA4 measurement ID in next.config
nozomione Dec 21, 2023
250d6ce
add GA4 / GTM scripts (for local development) in _document and _app f…
nozomione Dec 21, 2023
cf118a2
Merge branch 'dev' into nozomione/292-fix-dataset-loader-for-polling-…
nozomione Jan 17, 2024
af3b4c7
(rename) change the hook name 'useResourceLoader' to 'usePollDatasetS…
nozomione Jan 17, 2024
6f99fd8
(edit) update the useDatasetManager's startProcessingDataset method p…
nozomione Jan 17, 2024
deb7269
(edit) remove the optional param ‘oneOffExperiment’ and instead, use …
nozomione Jan 17, 2024
e30f513
(revet) revert back the JSX change in DatasetPageHeader (at 706548df0…
nozomione Jan 17, 2024
1f4df6c
Merge branch 'dev' into nozomione/292-fix-dataset-loader-for-polling-…
nozomione Jan 17, 2024
24ca4a5
(fix) fix a typo
nozomione Jan 18, 2024
6ff7ceb
(remove) remove the temp code blocks for local development
nozomione Jan 18, 2024
70df10b
(fix) added a space
nozomione Jan 18, 2024
59dd9b7
Merge branch 'dev' into nozomione/209-initial-ga-config
nozomione Jan 18, 2024
dfc21a9
Merge branch 'dev' into nozomione/223-set-up-github-webhook-for-data-…
nozomione Jan 18, 2024
b1fb8c2
Merge branch 'dev' into nozomione/270-implement-error-handling-for-da…
nozomione Jan 18, 2024
a3eeea1
Merge branch 'nozomione/292-fix-dataset-loader-for-polling-latest-pro…
nozomione Jan 18, 2024
b2486da
Merge branch 'nozomione/270-implement-error-handling-for-datasets' in…
nozomione Jan 18, 2024
4698de3
Merge branch 'nozomione/290-set-up-slack-webhook-for-search' into noz…
nozomione Jan 18, 2024
9ab9a5e
Merge branch 'nozomione/291-set-up-slack-webhook-for-experiment' into…
nozomione Jan 18, 2024
3e29e0f
Merge branch 'nozomione/222-set-up-hubspot-webhook-for-search' into n…
nozomione Jan 18, 2024
914b6f9
Merge branch 'nozomione/223-set-up-github-webhook-for-data-request' i…
nozomione Jan 18, 2024
1343144
(edit) add a logical OR for the development property measurement ID
nozomione Jan 22, 2024
0bde700
(edit) add a new helper formatFacetNames (previously in the useSearch…
nozomione Jan 22, 2024
e2c875e
create GA4 custom events script in the api folder
nozomione Jan 22, 2024
5ab4987
implement ga4 custom events for dataset
nozomione Jan 22, 2024
27b9eff
(minor) use destructure for transformationHumanReadable
nozomione Jan 23, 2024
a28a27f
(edit) revise gtag custom methods for Dataset
nozomione May 9, 2024
cdd7c35
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione May 9, 2024
d3fba24
(edit) adjust arguments for gtag Dataset custom events and clean up d…
nozomione May 9, 2024
8ec0b47
(edit) revise gtag custom event for Search
nozomione May 9, 2024
2545cb1
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione May 9, 2024
21bd471
(edit) revise gtag custom event for Outbound Clicks
nozomione May 10, 2024
7c2c4c9
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione May 10, 2024
22cd174
(move folder) move ./api/data-requests to ./data-requests and fix its…
nozomione Jun 14, 2024
6eb1163
(edit) use destructuring assignment to get the color and icon values …
nozomione Jun 14, 2024
1c555da
(edit) add the examples for Slack post data for experiment and search…
nozomione Jun 14, 2024
8f7051a
(edit) remove the ternary check for 'message' and 'status' when passi…
nozomione Jun 14, 2024
2a99a88
(revert temp) revert the temp commit (57f0ff1) included for demo/deve…
nozomione Jun 14, 2024
4445650
(edit) remove a local variable slackHookUrl (stores the Slack webbook…
nozomione Jun 14, 2024
1c9657c
(minor) fix typo - add a date in the slack post data's footer
nozomione Jun 14, 2024
199eb36
Merge branch 'nozomione/290-set-up-slack-webhook-for-search' into noz…
nozomione Jul 10, 2024
c15edde
Merge 'nozomione/291-set-up-slack-webhook-for-experiment' branch into…
nozomione Jul 10, 2024
634c516
Merge 'nozomione/222-set-up-hubspot-webhook-for-search' branch into n…
nozomione Jul 10, 2024
b8ba7bb
(merge) resolve conflicts and merge latest dev changes to nozomione/2…
nozomione Jul 11, 2024
ecb0d89
(rename) rename pathname to redirectPathname to be more explicit, ren…
nozomione Jul 11, 2024
22bf461
(rename) rename type to statusConfigs and its prop names (from icon t…
nozomione Jul 11, 2024
6d3670a
(edit) make submitSlackDataRequest accept the hook url as a parameter…
nozomione Jul 11, 2024
7bf8661
(edit) remove the local env for development (no longer requird and ev…
nozomione Jul 12, 2024
a017756
(edit) remove the local env for development (no longer requird) and e…
nozomione Jul 12, 2024
713810f
(edit) remove the passed prop 'queryTerm' from parent and get the sea…
nozomione Jul 16, 2024
ea59aa1
(edit) move link.data_request (previously refinebio_data_request) and…
nozomione Jul 16, 2024
8b23b73
Merge branch 'nozomione/290-set-up-slack-webhook-for-search' into noz…
nozomione Jul 16, 2024
9d684fa
Merge branch 'nozomione/291-set-up-slack-webhook-for-experiment' into…
nozomione Jul 16, 2024
3880d59
(edit) move hubsport_hook (previously webhook.hubspot) from config.li…
nozomione Jul 16, 2024
9035075
(edit) define the addRequestedExperiment method in RequestExperimentF…
nozomione Jul 16, 2024
fe920a2
(edit) change the host name per environment when sending the email lo…
nozomione Jul 25, 2024
0fffc80
Merge branch 'nozomione/290-set-up-slack-webhook-for-search' into noz…
nozomione Jul 25, 2024
9913608
(rename) rename the prop 'closeForm' to 'onSubmit' and add its defaul…
nozomione Jul 25, 2024
018e391
Merge branch 'nozomione/291-set-up-slack-webhook-for-experiment' into…
nozomione Jul 25, 2024
8fcd990
Merge 'nozomione/222-set-up-hubspot-webhook-for-search' branch into n…
nozomione Jul 25, 2024
905b920
(merge) resolve conflict and merge the latest dev changes into nozomi…
nozomione Jul 31, 2024
1d91439
Merge branch 'nozomione/291-set-up-slack-webhook-for-experiment' into…
nozomione Jul 31, 2024
f3825d1
Merge the 'dev' branch into nozomione/222-set-up-hubspot-webhook-for-…
nozomione Jul 31, 2024
3a3c48c
(merge) resolve conflicts
nozomione Jul 31, 2024
c923248
(fix) add the headers host to 'host' to prevent internal server error…
nozomione Aug 7, 2024
d33d11a
(edit) add try catch to pages/api/data-requests for better debugging
nozomione Aug 7, 2024
6bd1eae
(edit) use search endpoint to check the existing contact instead of G…
nozomione Aug 7, 2024
2c72123
(merge) resolve conflict and merge the latest 'nozomione/222-set-up-h…
nozomione Aug 7, 2024
5cc8eed
(fix) resolve the parsing error - add helpers/requestData to support …
nozomione Aug 7, 2024
fbf0dcd
(edit) update the config file and add try catch for better debuggig
nozomione Aug 7, 2024
9e9f837
(edit) change the host value to either prod or staging for security r…
nozomione Aug 7, 2024
a2b1e0d
Merge branch 'nozomione/222-set-up-hubspot-webhook-for-search' into n…
nozomione Aug 7, 2024
fceeaab
Merge the 'dev' branch into nozomione/223-set-up-github-webhook-for-d…
nozomione Aug 7, 2024
79daaf0
(edit) use if statement instead of switch and always return json for …
nozomione Aug 7, 2024
3ae074a
(re-format/edit) move the 'Slack Port' comment outside of async funct…
nozomione Aug 8, 2024
1ea9b7d
Merge branch 'dev' into nozomione/223-set-up-github-webhook-for-data-…
nozomione Aug 13, 2024
11f5af1
Merge branch 'nozomione/223-set-up-github-webhook-for-data-request' i…
nozomione Aug 13, 2024
2fcad9b
remove git tracking docker-compose.env (remove cache)
nozomione Aug 13, 2024
1d3f723
(edit) add a new env var 'STAGE_GA4_MEASUREMENT_ID' to 'docker-compon…
nozomione Aug 13, 2024
b5f11b8
Merge branch 'dev' into nozomione/209-initial-ga-config
nozomione Aug 13, 2024
e8a9e5a
(move) move src/api/anaytics/gtag.js to src/analytics/gtag.js
nozomione Aug 15, 2024
98bea01
(edit) use map instead of for-of loop in helpers/formatFacetNames
nozomione Aug 15, 2024
ff27d84
(edit) re-use 'options.transformation' in gtag.js and delete 'options…
nozomione Aug 15, 2024
a5d1a15
(rename) rename 'status' to 'isProcessed' for clearer indication that…
nozomione Aug 15, 2024
57de1f4
(edit) refactor the outboudClick method (now parameter is prefixed wi…
nozomione Aug 15, 2024
506fe4c
(edit) use explicit names for each variable instead of single chars i…
nozomione Aug 16, 2024
89e1d80
(edit) add comments for each functions to describe its purpose and be…
nozomione Aug 16, 2024
2819443
(mionr) update comments
nozomione Aug 16, 2024
10a2672
Merge branch 'dev' into nozomione/209-initial-ga-config
nozomione Aug 16, 2024
664f351
Merge branch 'nozomione/209-initial-ga-config' into nozomione/303-imp…
nozomione Aug 16, 2024
64152c0
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione Aug 16, 2024
d840461
(adjust import) adjust the import of gtag
nozomione Aug 16, 2024
2bb98c8
(edit) add a helper getFormattedDatasetOptions that formats the downl…
nozomione Aug 16, 2024
426c80a
Merge branch 'dev' into nozomione/303-implement-ga4-custom-events-script
nozomione Aug 19, 2024
2ab00b3
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione Aug 19, 2024
87b4770
(edit) create new helper modules(helpers/readable, analytics/helpers)…
nozomione Aug 27, 2024
9617d5e
(edit) update helpers/getReadable to prevent TypeError and return 'ke…
nozomione Aug 27, 2024
159cb55
Revert "remove git tracking docker-compose.env (remove cache)"
nozomione Aug 29, 2024
d365c50
(edit) add readableAnalyticsBooleans to config/readables, break the r…
nozomione Aug 29, 2024
3c77006
(edit) utilize updated analytics/helpers in analytics/gtag and clean …
nozomione Aug 29, 2024
32367c1
(edit) add validations for supported event and dimension names in the…
nozomione Aug 29, 2024
a20864f
(fix) explicitly returns null if no item selected from facet for prev…
nozomione Aug 29, 2024
9c60bf5
(edit) update trackDatasetDownload and trackSharedDataset to have a n…
nozomione Sep 5, 2024
af7d8b5
(clean up) remove formatFacetNames from useSearchManager hook(no long…
nozomione Sep 5, 2024
2cb338e
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione Sep 6, 2024
7e870d8
(adjust) modify arguments for tracking event methods for Dataset base…
nozomione Sep 6, 2024
b553f7d
(edit) add the rest of new dimension names to the 'suppoertedDimensio…
nozomione Sep 6, 2024
c904f58
(edit) add the rest of new dimension names to the 'suppoertedDimensio…
nozomione Sep 6, 2024
a0ad3ea
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione Sep 6, 2024
40657cb
(minor) fix a typo, improve the error message wording for GA4 event a…
nozomione Sep 6, 2024
579bcc8
(edit) fix a typo, improve the error message wording for GA4 event an…
nozomione Sep 6, 2024
564d99c
Merge branch 'nozomione/303-implement-ga4-custom-events-script' into …
nozomione Sep 6, 2024
61316a3
(edit) add a check for the experiment availability to SearchCardActio…
nozomione Sep 9, 2024
cd10291
Merge 'dev' branch into nozomione/315-add-ga4-custom-event-for-dataset
nozomione Sep 9, 2024
b2604f6
(edit) rename methods in ShareDatasetButton and useCopyToClipboard, c…
nozomione Sep 11, 2024
fc602f7
(refactor) change ‘SearchCardAction’ to take the entire data structur…
nozomione Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/components/Dataset/DatasetExplore.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useState } from 'react'
import { Box, Heading } from 'grommet'
import gtag from 'analytics/gtag'
import { usePageRendered } from 'hooks/usePageRendered'
import { useResponsive } from 'hooks/useResponsive'
import { Anchor } from 'components/shared/Anchor'
Expand All @@ -8,11 +9,17 @@ import { List } from 'components/shared/List'
import { Row } from 'components/shared/Row'
import { links } from 'config'

const ListItem = ({ text, href }) => (
<Box as="li" margin={{ bottom: 'small' }}>
<Anchor href={href} label={text} />
</Box>
)
const ListItem = ({ text, href }) => {
return (
<Box as="li" margin={{ bottom: 'small' }}>
<Anchor
href={href}
label={text}
onClick={() => gtag.trackExploredUsageClick(href)}
/>
</Box>
)
}

export const DatasetExplore = ({ dataset }) => {
const pageRendered = usePageRendered()
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dataset/DatasetReady.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState } from 'react'
import { Box, Heading, Text } from 'grommet'
import gtag from 'analytics/gtag'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useResponsive } from 'hooks/useResponsive'
import { useToken } from 'hooks/useToken'
Expand All @@ -21,6 +22,7 @@ export const DatasetReady = ({ dataset }) => {

const handleDownloadNow = async () => {
await downloadDataset(dataset.id, dataset.download_url)
gtag.trackDatasetDownload(dataset)
}

return (
Expand Down
4 changes: 3 additions & 1 deletion src/components/Dataset/DatasetRegenerate.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { useEffect, useState } from 'react'
import { useRouter } from 'next/router'
import { Box, Heading, Paragraph } from 'grommet'
import gtag from 'analytics/gtag'
import { cache, links } from 'config'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useResponsive } from 'hooks/useResponsive'
import { Anchor } from 'components/shared/Anchor'
import { Button } from 'components/shared/Button'
import { Column } from 'components/shared/Column'
import { InlineMessage } from 'components/shared/InlineMessage'
import { Row } from 'components/shared/Row'
import { cache, links } from 'config'

export const DatasetRegenerate = () => {
const {
Expand All @@ -29,6 +30,7 @@ export const DatasetRegenerate = () => {
const response = await updateDataset(await createDataset(), params)
const pathname = `/dataset/${response.id}`

gtag.trackRegeneratedDataset(selectedDataset)
push(
{
pathname,
Expand Down
2 changes: 2 additions & 0 deletions src/components/Dataset/MoveToDatasetModal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useRouter } from 'next/router'
import { Box, Heading } from 'grommet'
import gtag from 'analytics/gtag'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useResponsive } from 'hooks/useResponsive'
import formatNumbers from 'helpers/formatNumbers'
Expand Down Expand Up @@ -57,6 +58,7 @@ export const MoveToDatasetModal = ({
pathname
)
}
gtag.trackDatasetAction(MoveToDatasetModal)
closeModal(id)
}

Expand Down
24 changes: 13 additions & 11 deletions src/components/Dataset/ShareDatasetButton.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useEffect, useState } from 'react'
import { Box, Heading } from 'grommet'
import gtag from 'analytics/gtag'
import { useModal } from 'hooks/useModal'
import { useResponsive } from 'hooks/useResponsive'
import { useTimeoutInCallback } from 'hooks/useTimeoutInCallback'
Expand All @@ -10,20 +11,26 @@ import { InlineMessage } from 'components/shared/InlineMessage'
import { Modal } from 'components/shared/Modal'
import { TextInput } from 'components/shared/TextInput'

export const ShareDatasetButton = ({ datasetId }) => {
export const ShareDatasetButton = ({ dataset }) => {
const { openModal } = useModal()
const { setResponsive } = useResponsive()
const { startTimer, clearTimer } = useTimeoutInCallback(() => {
setIsCopied(false)
}, 3000)
const [isCopied, setIsCopied] = useState(false)
const [value, handdleCopy] = useCopyToClipboard(null)
const [value, copyText] = useCopyToClipboard(null)
const { id: datasetId } = dataset
const id = `shareable-link_${datasetId}`
const shareableLink = `${getDomain()}/dataset/${datasetId}?ref=share`

const handleClick = (link) => {
handdleCopy(link)
const onShareClick = () => {
openModal(id)
}

const onCopyClick = () => {
copyText(shareableLink)
setIsCopied(true)
gtag.trackSharedDataset(dataset)
}

useEffect(() => {
Expand All @@ -39,7 +46,7 @@ export const ShareDatasetButton = ({ datasetId }) => {
label="Share Dataset"
secondary
responsive
onClick={() => openModal(id)}
onClick={onShareClick}
/>
}
fullHeight={false}
Expand Down Expand Up @@ -71,12 +78,7 @@ export const ShareDatasetButton = ({ datasetId }) => {
<TextInput value={shareableLink} />
</Box>
<Box>
<Button
label="Copy"
primary
responsive
onClick={() => handleClick(shareableLink)}
/>
<Button label="Copy" primary responsive onClick={onCopyClick} />
</Box>
</Box>
</Box>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Download/DatasetDetails/RemoveAllButton.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box, Heading } from 'grommet'
import gtag from 'analytics/gtag'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useModal } from 'hooks/useModal'
import { useResponsive } from 'hooks/useResponsive'
Expand All @@ -15,6 +16,7 @@ export const RemoveAllButton = () => {
const handleRemoveAll = () => {
clearDataset()
closeModal(id)
gtag.trackDatasetAction(RemoveAllButton)
}

return (
Expand Down
12 changes: 10 additions & 2 deletions src/components/Download/FilesSummary.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useState } from 'react'
import { Box, Heading, Text } from 'grommet'
import gtag from 'analytics/gtag'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useResponsive } from 'hooks/useResponsive'
import { links, options } from 'config'
Expand Down Expand Up @@ -37,7 +38,7 @@ const Card = ({ description, format, index, title }) => {
)
}

export const FilesSummary = ({ dataset, isProcessed }) => {
export const FilesSummary = ({ dataset, defaultDataset = {}, isProcessed }) => {
const { createDataset, updateDataset, regeneratedDataset } =
useDatasetManager()
const { setResponsive } = useResponsive()
Expand Down Expand Up @@ -105,17 +106,24 @@ export const FilesSummary = ({ dataset, isProcessed }) => {
(acc, cur) => ({ ...acc, [cur.value]: cur.label }),
{}
)

const [openForm, setOpenForm] = useState(false)

const handleRegenerateDataset = async (downloadOptions) => {
const params = { data: dataset.data, ...downloadOptions }

const response = await updateDataset(
regeneratedDataset?.id || (await createDataset()),
params
)
const pathname = `/dataset/${response.id}`

gtag.trackRegeneratedDataset(
defaultDataset,
JSON.stringify(defaultDataset) !== JSON.stringify(dataset)
? dataset
: null
)

return pathname
}

Expand Down
4 changes: 3 additions & 1 deletion src/components/Download/StartProcessingForm/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { useRouter } from 'next/navigation'
import { Formik } from 'formik'
import { Form } from 'grommet'
import gtag from 'analytics/gtag'
import { validationSchemas } from 'config'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useResponsive } from 'hooks/useResponsive'
import subscribeEmail from 'helpers/subscribeEmail'
import { validationSchemas } from 'config'
import { Button } from 'components/shared/Button'
import { Column } from 'components/shared/Column'
import { Row } from 'components/shared/Row'
Expand Down Expand Up @@ -46,6 +47,7 @@ export const StartProcessingForm = ({ dataset }) => {

const pathname = `/dataset/${response.id}`
push({ pathname }, pathname)
gtag.trackDatasetDownloadOptions(dataset)
setSubmitting(false)
}}
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import gtag from 'analytics/gtag'
import { useDatasetManager } from 'hooks/useDatasetManager'
import formatNumbers from 'helpers/formatNumbers'
import { Button } from 'components/shared/Button'
Expand All @@ -6,14 +7,19 @@ import { InlineMessage } from 'components/shared/InlineMessage'
export const AddRemainingDatasetButton = ({ dataToAdd, samplesInDataset }) => {
const { loading, addSamples } = useDatasetManager()

const handleClick = () => {
addSamples(dataToAdd)
gtag.trackDatasetAction(AddRemainingDatasetButton)
}

return (
<>
<Button
isLoading={loading}
label="Add Remaining"
secondary
responsive
onClick={() => addSamples(dataToAdd)}
onClick={handleClick}
/>
<InlineMessage
label={
Expand Down
16 changes: 9 additions & 7 deletions src/components/shared/DatasetActionButton/AddToDatasetButton.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import gtag from 'analytics/gtag'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { Button } from 'components/shared/Button'

export const AddToDatasetButton = ({
dataToAdd,
label = 'Add To Dataset',
...props
}) => {
export const AddToDatasetButton = ({ dataToAdd, ...props }) => {
const { loading, addSamples } = useDatasetManager()

const handleClick = () => {
addSamples(dataToAdd)
gtag.trackDatasetAction(AddToDatasetButton)
}

return (
<Button
label={label}
label="Add To Dataset"
isLoading={loading}
responsive
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
onClick={() => addSamples(dataToAdd)}
onClick={handleClick}
/>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Box } from 'grommet'
import gtag from 'analytics/gtag'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useResponsive } from 'hooks/useResponsive'
import { Button } from 'components/shared/Button'
Expand All @@ -8,6 +9,11 @@ export const RemoveDatasetButton = ({ dataToRemove }) => {
const { loading, removeSamples } = useDatasetManager()
const { setResponsive } = useResponsive()

const handleClick = () => {
removeSamples(dataToRemove)
gtag.trackDatasetAction(RemoveDatasetButton)
}

return (
<Box align="center" direction="row" wrap>
<InlineMessage
Expand All @@ -23,7 +29,7 @@ export const RemoveDatasetButton = ({ dataToRemove }) => {
linkFontSize={setResponsive('medium', 'small')}
margin={{ left: 'xsmall' }}
width="50px"
onClick={() => removeSamples(dataToRemove)}
onClick={handleClick}
/>
</Box>
)
Expand Down
7 changes: 1 addition & 6 deletions src/components/shared/SearchCard/SearchCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ export const SearchCard = ({ result = {} }) => {
</Box>
<Box gridArea="ctas" margin={{ top: setResponsive('none', 'large') }}>
<Box align={setResponsive('start', 'end')} width="100%">
<SearchCardAction
accessionCode={accessionCode}
downloadableSamples={downloadableSamples}
organismNames={organismNames}
technology={technology}
/>
<SearchCardAction experiment={result} technology={technology} />
</Box>
</Box>
<Box gridArea="meta">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import { Modal } from 'components/shared/Modal'
import { DownloadNowModal } from './DownloadNowModal'

export const DownloadNowButton = ({
accessionCode,
experiment,
hasMultipleOrganisms,
hasRnaSeq
}) => {
const { accession_code: accessionCode } = experiment
const { openModal } = useModal()
const id = `download-now-${accessionCode}`

Expand All @@ -26,7 +27,7 @@ export const DownloadNowButton = ({
width="600px"
>
<DownloadNowModal
accessionCode={accessionCode}
experiment={experiment}
hasMultipleOrganisms={hasMultipleOrganisms}
hasRnaSeq={hasRnaSeq}
id={id}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Formik } from 'formik'
import { Box, Form, Heading, Paragraph } from 'grommet'
import gtag from 'analytics/gtag'
import { options, validationSchemas } from 'config'
import { useDatasetManager } from 'hooks/useDatasetManager'
import { useResponsive } from 'hooks/useResponsive'
Expand All @@ -13,13 +14,14 @@ import { ReceiveUpdatesCheckBox } from 'components/Download/StartProcessingForm/
import { TermsOfUseCheckBox } from 'components/Download/StartProcessingForm/TermsOfUseCheckBox'

export const DownloadNowModal = ({
accessionCode,
experiment,
hasMultipleOrganisms,
hasRnaSeq
}) => {
const { email, startProcessingDataset } = useDatasetManager()
const { setResponsive } = useResponsive()
const { StartProcessingFormSchema } = validationSchemas
const { accession_code: accessionCode } = experiment

return (
<Box pad={{ bottom: 'small', horizontal: 'large' }}>
Expand Down Expand Up @@ -53,6 +55,7 @@ export const DownloadNowModal = ({
}

await startProcessingDataset(values, null, accessionCode)
gtag.trackOneOffExperimentDownload(experiment)
setSubmitting(false)
}}
>
Expand Down
Loading