14 Commits

Author SHA1 Message Date
7df004ac47 Enhance TemplateEditor and TemplatePreview Components with Layout Improvements
- Added minWidth property to the TemplateEditor component for better layout control.
- Introduced a responsive toolbar in the TemplatePreview component, utilizing Popover for improved UI on smaller screens.
- Implemented a ResizeObserver to dynamically adjust toolbar settings based on available width, enhancing user experience.
- Refactored toolbar content handling to streamline button interactions and improve accessibility.
2026-09-07 01:20:28 +01:00
8035c2ba59 Refactor AppUpdateProgress and TemplatePreview to Use ProgressDisplay Component
- Replaced HProgress and ElipsisText with the new ProgressDisplay component in AppUpdateProgress for improved code clarity and reusability.
- Updated TemplatePreview to utilize ProgressDisplay for rendering download progress, enhancing consistency across components.
- Introduced ProgressDisplay component to encapsulate progress rendering logic, allowing for customizable label positioning and styling.
2026-08-22 13:37:36 +01:00
fb52a14dd0 Refactor TemplatePreview for Improved Layout and Responsiveness
- Replaced a div with a Flex component to enhance layout and alignment of the TemplatePreview.
- Adjusted styles to ensure minimum width and proper cursor behavior during panning.
- Streamlined iframe rendering within the new structure for better responsiveness and user experience.
2026-08-22 13:11:49 +01:00
47e4e60b86 Enhance TemplatePreview with Clear Iframe Contents Functionality
- Added a new function to clear iframe contents, improving resource management and preventing stale data display.
- Integrated the clearIframeContents function into the PDF preview type change handler, ensuring a clean slate when switching to PDF previews.
- Updated state management for iframe size and preview content to enhance user experience and maintain consistency.
2026-08-22 13:04:57 +01:00
9766f4b6c3 Update TemplatePreview Component with Enhanced Card Styling
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
- Modified the TemplatePreview component to improve the styling of the Card element, setting maxWidth, minWidth, and margin for better layout.
- Adjusted Flex component's gap for improved spacing between elements, enhancing overall visual presentation.
2026-08-22 13:00:53 +01:00
85273bea1b Add PDF Preview and Viewer Components with Enhanced Styling
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
- Introduced PDFPreview and PDFViewer components to facilitate PDF rendering and interaction within the dashboard.
- Implemented zoom and pan functionalities in PDFPreview for improved user experience.
- Enhanced App.css with styles for a new overlay during PDF loading, ensuring a smooth visual transition.
- Updated TemplatePreview to integrate PDF viewing capabilities, allowing users to preview PDF documents seamlessly.
- Modified ApiServerContext to support asynchronous PDF downloads, improving document handling efficiency.
2026-08-22 12:55:50 +01:00
c5b421533f Add PageBreak Support to Template Elements and Enhance TemplatePreview Resizing
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
- Added 'PageBreak' to the list of template elements in schema.js, allowing for better document structuring.
- Updated TemplatePreview component to dynamically adjust the size of preview wrappers based on content dimensions, improving visual presentation and user experience.
2026-08-22 00:17:48 +01:00
53d488011b Add Pan Icon and Pan Filled Icon Components for Template Preview
- Introduced new PanIcon and PanFilledIcon components to enhance the TemplatePreview functionality.
- Implemented panning feature in TemplatePreview, allowing users to navigate through content more intuitively.
- Updated TemplatePreview to toggle panning mode with visual feedback using the new icons.
- Enhanced user experience by managing pointer events and cursor styles during panning.
2026-08-21 23:15:41 +01:00
fede8af6aa Enhance TemplatePreview Component with Scroll and Iframe Resizing Features
- Refactored the TemplatePreview component to improve iframe content size handling and scrolling behavior.
- Introduced a new ScrollBox component to manage scroll position and enhance user experience.
- Implemented a ResizeObserver to dynamically adjust iframe size based on content, ensuring better display of HTML previews.
- Added cleanup logic for the observer to prevent memory leaks during component unmounting.
2026-08-21 23:06:11 +01:00
f743f9b892 Refactor TemplateEditor and TemplatePreview components for improved performance and error handling
Some checks failed
farmcontrol/farmcontrol-ui/pipeline/head There was a failure building this commit
- Updated TemplateEditor to use useCallback for handlePreviewMessage, optimizing performance.
- Enhanced TemplatePreview by adding default no-op functions for onTestObjectOpen and onPreviewMessage props.
- Improved error handling in fetchTemplatePDF and fetchTemplatePreview methods to ensure callbacks are only invoked if they are functions.
- Refactored preview loading logic to prevent unnecessary calls when template ID is not available.
2026-07-28 01:50:16 +01:00
f6986a45cd Fixed all warnings. 2025-12-27 15:06:02 +00:00
8f34c262a0 Added PDF preview option. 2025-11-23 13:25:43 +00:00
48631c98c3 Refactor file handling and update API methods for improved file management. Renamed fetchObjectContent to fetchFileContent, updated related function calls, and enhanced file preview capabilities. Removed unused components and optimized imports. 2025-11-16 17:02:15 +00:00
c7ddcd36e3 Refactor TemplateEditor component to utilize TemplatePreview for improved preview functionality; remove unnecessary state and effects, enhancing code clarity and maintainability. 2025-09-05 23:19:20 +01:00