Tags: kelindar/folio
Tags
Implement tab grouping for large documents (#17) * Refactor HTML form rendering and add tab support - Removed the hxDivider component from the HTML form template to streamline the layout. - Updated the hxFormContent function to reflect the removal of hxDivider. - Introduced new functions in parse.go to handle tab extraction from struct field tags. - Enhanced render.go to support rendering struct fields with tabs, allowing for better organization of form fields. - Implemented a new renderStructWithTabs function to group fields by tabs and render them accordingly. - Modified the renderSlice function to handle slice items more effectively, ensuring proper rendering of nested structs and synthetic fields. * Update templ version and refactor HTML rendering in menu and page templates - Bump templ version from v0.2.778 to v0.3.943 in html_menu_templ.go and html_page_templ.go. - Replace direct buffer writes with templruntime.WriteString calls for improved error handling and consistency. - Ensure all functions return nil instead of the error variable for cleaner error management. - Adjust HTML structure in both templates to maintain functionality while enhancing readability. * Refactor styles and update HTML structure for tabs and forms * Enhance form handling with active tab support - Updated the hxFormContent template to include the active tab as a query parameter in the form action URL. - Modified hxFormActions to pass the current tab value when canceling or saving changes. - Adjusted hxFormEditButton to include the current tab in the edit button's request. - Updated the hxFormContent function in the Go template to handle the new tab parameter correctly. - Enhanced the server-side logic to retrieve and store the active tab from query parameters during object editing and saving. * Update styles for tabs and form headers with new background patterns * Enhance tab handling in struct rendering - Introduced TabInfo struct to encapsulate tab name and optional icon. - Updated decodeTab function to extract both name and icon from struct field tags. - Modified renderStructWithTabs to utilize TabInfo, allowing for better tab management and rendering. - Default tab name is now "General" for fields without a tab tag, with an empty icon. - Updated the return signature of StructTabs to include tab information. * Remove deprecated tab styles and switcher visibility rules * Refactor propsOf function to simplify parent object handling * Simplify active tab retrieval from query parameters in editObject function
feat: add support for flags in lookup and validation (#11) - Implemented `lookupFlags` to handle multiple selection fields with flags. - Added `decodeFlags` function to parse flags from struct tags. - Enhanced `renderValue` to support rendering flags fields. - Introduced `IsFlags` validator to check if selected values are within allowed flags. - Added unit tests for flags functionality, including decoding and validation. - Updated existing tests to ensure compatibility with new flags feature.
Bump golang.org/x/crypto from 0.26.0 to 0.31.0 in /examples/company (#9) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.26.0 to 0.31.0. - [Commits](golang/crypto@v0.26.0...v0.31.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-version: 0.31.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
PreviousNext