Skip to content

OBPIH-7269 Add Import Count Widget#5277

Merged
awalkowiak merged 6 commits intodevelopfrom
OBPIH-7269
May 27, 2025
Merged

OBPIH-7269 Add Import Count Widget#5277
awalkowiak merged 6 commits intodevelopfrom
OBPIH-7269

Conversation

@alannadolny
Copy link
Collaborator

No description provided.

@alannadolny alannadolny self-assigned this May 26, 2025
@github-actions github-actions bot added domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization labels May 26, 2025
@codecov
Copy link

codecov bot commented May 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 8.31%. Comparing base (fd285c1) to head (5d3ebef).
⚠️ Report is 120 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##             develop   #5277      +/-   ##
============================================
- Coverage       8.38%   8.31%   -0.07%     
+ Complexity       996     985      -11     
============================================
  Files            646     646              
  Lines          43397   43397              
  Branches       10535   10535              
============================================
- Hits            3637    3607      -30     
- Misses         39195   39231      +36     
+ Partials         565     559       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const getFileExtension = (file) => file.name.split('.')?.[1];

const validateFileType = (file) => {
if (allowedExtension === getFileExtension(file)) {
Copy link
Member

Choose a reason for hiding this comment

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

since this is a generic component, why not have it work like the FileSelect and allow for multiple possible file extensions? Seems like you could just copy/paste the code from there. It would give us more flexibility in the future

import useTranslate from 'hooks/useTranslate';
import Translate from 'utils/Translate';

const ButtonFileSelect = ({
Copy link
Member

Choose a reason for hiding this comment

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

How is this component working differently from the FileSelect one? Is it just that the behaviour is wrapped in a button instead of being directly embedded in the page? If so, what's preventing the ButtonFileSelect from simply wrapping the FileSelect compoment? Why do we need both?

Can you add a screenshot of the widget to the PR description? That would be helpful for visualizing the change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Those two components have totally different UI. The FileSelect is a drop zone for files. In that case, you just have a button.
Screencast from 26.05.2025 13:09:18.webm

import useTranslate from 'hooks/useTranslate';
import Translate from 'utils/Translate';

const ButtonFileSelect = ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since we have different components for "Button" and "Dropzone", then perhaps the other one should be renamed to DropzoneFileSelect too.

@awalkowiak awalkowiak merged commit 8d89186 into develop May 27, 2025
8 checks passed
@awalkowiak awalkowiak deleted the OBPIH-7269 branch May 27, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: frontend Changes or discussions relating to the frontend UI domain: l10n Changes or discussions relating to localization & Internationalization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants