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

make Semantic-UI's AddButton not show an empty label #3142

Merged

Conversation

LucienLeMagicien
Copy link
Contributor

@LucienLeMagicien LucienLeMagicien commented Sep 23, 2022

Reasons for making this change

The Semantic-UI theme's AddButton, which is used for ObjectFieldTemplate and ArrayFieldTemplate, currently displays an empty slot for a non-existent label:
image
This makes it show a square button:
image

Checklist

  • I'm adding or updating code
    • I've added and/or updated tests. I've run npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR

I cannot run/update the tests as the build fails for me. I assume it's somehow a me issue though:

[@rjsf/core     ] > @rjsf/core@5.0.0-beta.9 build
[@rjsf/core     ] > rimraf dist && dts build --rollupTypes --format cjs,esm,umd
[@rjsf/core     ] 
[@rjsf/core     ] node:internal/modules/cjs/loader:936
[@rjsf/core     ]   throw err;
[@rjsf/core     ]   ^
[@rjsf/core     ] 
[@rjsf/core     ] Error: Cannot find module './templates.js'
[@rjsf/core     ] Require stack:
[@rjsf/core     ] - [...]/packages/core/node_modules/@babel/highlight/node_modules/chalk/index.js

the ./templates.js file is present in node_modules/chalk/, but not in packages/core/node_modules/@babel/highlight/node_modules/chalk/ (and all other dependencies depending on it). I'd appreciate guidance on this. Should I open a separate issue?

EDIT: ignore the above. Deleting the node_modules folders and re-running npm install fixed it. I assume the node_modules folders ended up in an invalid state after my first run of npm run build failed.
For the record, this is what I ran:

rm --recursive --force --verbose packages/*/node_modules
rm -rfv node_modules/
npm install

@LucienLeMagicien LucienLeMagicien changed the title fix: make AddButton not show an empty label make Semantic-UI's AddButton not show an empty label Sep 23, 2022
@heath-freenome
Copy link
Member

@LucienLeMagicien Can you update the tests for this change? npm run test:update will fix the snapshots

@heath-freenome heath-freenome merged commit a759402 into rjsf-team:main Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants