🐛 fix(GenericNode): add semicolon to console.log statement
The use of eval in the code can be a security risk as it can execute arbitrary code. Using ast.literal_eval instead of eval is a safer alternative as it only evaluates a subset of Python expressions. The semicolon was added to the console.log statement to improve code consistency.
The changes in these files are purely cosmetic, fixing indentation and whitespace to improve code readability.
🔨 refactor(genericModal/index.tsx): improve code readability and add destructuring to props
The code has been refactored to improve readability and make it easier to understand. Destructuring has been added to the props to make it easier to access the values.
The `format` script has been added to the `package.json` file in the `frontend` directory. This script uses `prettier` to format all files with the extensions `.js`, `.jsx`, `.ts`, `.tsx`, `.json`, and `.md` in the `src` directory. This ensures that the codebase is consistent and follows a standard formatting style.
✨ feat(GenericNode): add ChromaIcon and fix validation status icons
🎨 style(GenericNode): refactor GenericNode component to improve readability
🐛 fix(vite.config.ts): add svgr plugin to the frontend Vite configuration
The vite-plugin-svgr dependency was added to both the root and frontend package.json files to enable the use of SVG files as React components. The GenericNode component was updated to include the ChromaIcon component and to fix the validation status icons. The component was also refactored to improve readability. The svgr plugin was added to the frontend Vite configuration to enable the use of SVG files as React components.
## Dynamic Font Size for ButtonBox Component
### Description
The ButtonBox component, which is used in the examples modal, has been
enhanced to have a dynamic font size that adjusts based on the length of
the text and the dimensions of its parent element. This improvement
ensures that the text within the ButtonBox component remains readable
and properly fits within its container.
### Changes Made
- Added a new `fontSize` state variable to track the font size within
the ButtonBox component.
- Utilized the `useEffect` hook to calculate and update the font size
dynamically.
- Implemented logic to check for both vertical and horizontal overflow
of the text within the parent container.
- Decreased the font size incrementally until the text fits within the
parent element's dimensions.
- Updated the component to apply the calculated font size to the text
element.
### Testing Done
- Manually tested the ButtonBox component with various text lengths and
parent container dimensions.
- Verified that the font size was adjusted correctly to fit the text
within the parent element without overflowing.
- Modified UI styles in the app, making text more legible and buttons more visually appealing
- Changed chat trigger button to a gradient blue background to improve visibility and user experience
The position of the link to the Logspace website has been adjusted to be more centered on the page. The left margin has been increased by one unit to make it more visually appealing.
✨ feat(chatModal): add focus to chat input when modal is opened
The chat input was not resizing properly when the user typed more than one line of text. This was fixed by setting the height of the input to the scrollHeight of the input element. Additionally, the chat input is now focused when the chat modal is opened, which improves the user experience.
Fixes Text area is broken #328
The version number is now displayed in the footer of the application. The version number is fetched from the server using the /version endpoint and displayed in the footer. This allows users to easily identify which version of the application they are using.
This commit adds retry logic to the getAll API call in the TypesProvider component. The retry logic will attempt to make the API call up to 5 times with an increasing delay between each attempt. If the API call is successful, the state of the component will be updated with the retrieved data. If the component is unmounted before the API call resolves, the state will not be updated.