SciCatProject / SciCatProject/frontend
ConfigurableActions isVisible condition wrong
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 29
- Forks
- 44
- Avg merge
- 20h 2m
- Merged PRs (30d)
- 20
Description
Summary
The configurable actions component is meant to be a general purpose component
which can be reused in multiple places.
The appConfig includes multiple switches datasetActionsEnabled, datafilesActionsEnabled, datasetDetailsActionsEnabled and datasetSelectionActionsEnabled.
While currently only datasetActions and datafilesActions are implemented,
the isVisible function of the component depends only on datafilesActionsEnabled,
which means if only datasetActionsEnabled is true, the component is not rendered.
See line 19 in the code:
https://github.com/SciCatProject/frontend/blob/ee7e10808114f7d568d8b7feb244a4423abc5347/src/app/shared/modules/configurable-actions/configurable-actions.component.ts#L19
Steps to Reproduce
set datasetActionsEnabled: true and datafilesActionsEnabled: false in the frontend config
Current Behaviour
the datasetActions component(s) are not rendered
Expected Behaviour
the switch datasetActionsEnabled should enable the component even if datafilesActions are disabled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/app/shared/modules/configurable-actions/configurable-actions.component.ts at the isVisible function referenced by the issue. Review how datasetActionsEnabled and datafilesActionsEnabled are read from appConfig, then reproduce the configuration with datasetActionsEnabled true and datafilesActionsEnabled false. Done means the dataset actions component renders in that configuration while the existing datafiles behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100