-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: add flag to add UI source map files during the build process #1183
feat: add flag to add UI source map files during the build process #1183
Conversation
This reverts commit a670fc7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests for the new changes in main.py
and fix pre-commit
.
added simple test to check call generate function correctly but will have a think about some more tests to actually validate if files are propageted, not sure if we got any of tests like that |
Also added smoke tests |
Separation done similar to: https://splunk.github.io/addonfactory-ucc-generator/advanced/custom_rest_handler/ Fixes #331. Co-authored-by: mahirchavda <mahir.chavda13@gmail.com> --------- Co-authored-by: Artem Rys <rysartem@gmail.com>
…figuration page (#1181) - Added support for text truncation when the page width is too small. - Adjusted the button width to prevent the label from overflowing beyond the button's border. - Here is the reference: screenshot before the fix: <img width="1028" alt="Screenshot 2024-05-06 at 11 44 03 AM" src="https://github.com/splunk/addonfactory-ucc-generator/assets/163995910/821bfb86-e39d-4d36-af0c-80ef0e84d682"> screenshot after the fix: <img width="1053" alt="Screenshot 2024-05-09 at 3 01 32 PM" src="https://github.com/splunk/addonfactory-ucc-generator/assets/163995910/471fe0b8-90ba-4148-8c9d-9b89268f7410"> --------- Co-authored-by: srv-rr-github-token <94607705+srv-rr-github-token@users.noreply.github.com> Co-authored-by: Artem Rys <rysartem@gmail.com>
- Update `@splunk/react-ui` to v4.30.0
This PR introduces a new PR template.
…1177) ADDON-69825 - The generated files and source files are compared with their names. If the names are same, warning log for such files is mentioned. - Reason: the file names would be same when generated from globalConfig vs present in the source code such that the source code would replace the generated code. - Updated the test case when the warning logs should be present and absent. --------- Co-authored-by: Artem Rys <rysartem@gmail.com>
Add configurable support for none text files, via encoding content to base64 string. https://splunk.atlassian.net/browse/ADDON-69993
**Issue number:** --- ## Summary Fix path reference inside smoke tests. Previously 2 tests pointed to static "expected" files that were added manually ### Changes > Changes path reference to temp directory instead of static files ### User experience > Not apllicable ## Checklist If your change doesn't seem to apply, please leave them unchecked. * [x] I have performed a self-review of this change * [x] Changes have been tested * [ ] Changes are documented * [x] PR title follows [conventional commit semantics](https://www.conventionalcommits.org/en/v1.0.0/)
Updating the globalConfig before validating with `schema.json` to provide straightforward upgrade of the add-on. --------- Co-authored-by: Artem Rys <rysartem@gmail.com>
Please update the title of the PR and please use the new PR template, specifically please expand on the user experience section. |
done |
tests/smoke/test_ucc_build.py
Outdated
assert path.exists(expected_file_path) | ||
|
||
|
||
def test_ucc_generate_without_ui_source_map(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please merge this test with test_ucc_generate_everything
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Add source map (.js.map files) conditionally to built code.
Issue number: ADDON-70442
Summary
Currently when users are running ucc-gen build by default source map files (.js.map) are generated and inserted in output. For most users it is unwanted code and only increases the size of package.
With this PR inside a command we can decide if we want to generate output code with source map or not
(By default it is WITHOUT source map)
the flag that decides about it is
--ui-source-map
Changes
Add support for
--ui-source-map
flag and conditionally copies .js.map files from UI outputUser experience
With that change standard user will have a significantly smaller package, as unnecessary source map files wont be generated.
But also there is a possibility to generate those files if needed.
When users runs standard command
ucc-gen build
, user will have smaller packed, reduced by source map (comparing to current behaviour)When users runs standard command with flag
ucc-gen build --ui-source-map
, package with source map files will be generated (current state)Checklist
If your change doesn't seem to apply, please leave them unchecked.