SciCatProject / SciCatProject/frontend

ConfigurableActions isVisible condition wrong

Open
#2,133 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.