Commit graph

212 commits

Author SHA1 Message Date
74e4252197 fix(typeahead_input): fix test component initialization and cleanup to solve build errors 2025-05-13 17:15:38 +03:00
c3bd3b1f27 docs(README): add section for running tests with native Rust and WASM 2025-05-12 17:32:41 +03:00
1334336377 test(wasm):add wasm-bindgen-test support 2025-05-12 17:32:22 +03:00
a2a1a48ea6 test(typeahead_input): add unit tests for TypeaheadInput component initialization, cleanup, and rapid mount/unmount 2025-05-09 17:40:23 +03:00
46b6cf82e2 feat(panic_hook): implement custom panic hook for enhanced diagnostics on Leptos owner disposal 2025-05-09 16:31:53 +03:00
24c138b866 fix(typeahead_input): add explicit alive flag and defensive js checks for component lifecycle management 2025-05-09 15:04:02 +03:00
e528f9e684 feat(utils): add utility function to safely execute closures with current Leptos owner 2025-05-09 14:11:15 +03:00
a69c51921b fix(typeahead_input): add check for valid Leptos owner before setting initialized state 2025-05-08 15:17:53 +03:00
dbca9a98c8 fix(typeahead): add defensive checks for valid Leptos owner in Bloodhound and Typeahead initialization 2025-05-07 17:04:33 +03:00
a9bfbf1c15 feat(typeahead_input): Refactor and enhance TypeaheadInput component for better lifecycle management and WASM compatibility. 2025-05-06 17:11:52 +03:00
09dd736082 fix(Leptos): Explicitly tell Leptos where to find the configuration 2025-04-28 16:33:21 +03:00
0f28394fce fix(typeahead): implement component isolation to prevent memory leaks and race conditions 2025-04-25 17:52:30 +03:00
1fd4131298 fix(memory issues): made the followng to help debug memory issues.
- Reduce Closure Captures: Take snapshots of signal values before using them in closures.
-Simplify Event Handlers: Break down complex event handlers into smaller, more manageable pieces.
-Improve Error Handling: Add proper error handling to prevent crashes when unexpected conditions occur.
-Optimize Data Flow: Ensure data flows in a more predictable way through the application.
-Isolate Side Effects: Move side effects like API calls into separate tasks to avoid blocking the main thread.

(in progress)
2025-04-24 18:03:45 +03:00
26724d9c45 feat(properties): add empty property check, placeholder labels and labels error handling 2025-04-24 17:18:47 +03:00
2d286e5834 fix(typeahead): add lifecycle management 2025-04-22 15:21:52 +03:00
37d157725e fix(typeahead): create a new row when typing in the name input field 2025-04-18 15:43:23 +03:00
7d36bac77f fix(typeahead): fix the handler name generation 2025-04-18 14:53:55 +03:00
fd0d4a5f38 fix(typeahead): bypass Bloodhound's AJAX to properly display typeahead suggestions 2025-04-17 17:51:58 +03:00
486bf9cbad feat(typeahead): update structure and enhance Typeahead integration and logging:
- Bloodhound Initialization:
  - Changed the suggestion object structure to a flattened format for Typeahead compatibility.
  - Removed nested `display` structure in favor of direct `displayLabel` and `displayDescription` fields.
  - Simplified the construction of suggestion objects by directly setting flattened fields.

- Typeahead Initialization:
  - Enhanced logging in the JavaScript initialization script for better debugging.
  - Updated the `display` function in Typeahead to use flattened fields (`displayLabel` and `displayDescription`) instead of nested `display` objects.
  - Improved error handling and logging for cases where suggestions are not arrays or are empty.

- Selection Handling:
  - Added detailed logging for selected suggestions in both Rust and JavaScript.
  - Ensured the input field is updated with the selected suggestion's label.

- Code Cleanup:
  - Removed redundant nested object creation for `display` fields in Bloodhound initialization.
  - Streamlined the JavaScript initialization script for better readability and maintainability.
  - Consolidated logging statements for consistent debugging output.
2025-04-14 17:42:04 +03:00
b017df9b35 buld(port): change ip adress to 3004 2025-04-11 16:20:40 +03:00
102f69fd29 fix(debug): remove buggy typeahead debug check 2025-04-11 16:16:16 +03:00
f646b92d3a feat(typeahead): enhance TypeaheadInput component for improved functionality
- Improved Bloodhound initialization:
  - Added nested display structure for suggestions (label and description).
  - Included a response filter to handle empty responses gracefully.
  - Added rate-limiting and wildcard support for remote queries.
- Enhanced Typeahead initialization:
  - Added custom templates for rendering suggestions with nested display fields.
  - Included debug logs for better traceability of Typeahead and Bloodhound instances.
  - Improved error handling for deserialization of suggestions.
- Added support for opening the dropdown on receiving suggestions.
- Updated input event handler to include additional debug checks for Typeahead instance.
- Ensured proper cleanup and memory management for closures and global handlers.
- Added custom CSS styles for `.typeahead` input and suggestion dropdown to enhance UI/UX.
2025-04-11 15:34:19 +03:00
07405db017 feat(typeahead): Enhance Bloodhound and Typeahead initialization logic
- Improved Bloodhound initialization by adding explicit global storage for the instance.
- Enhanced `initialize_bloodhound` to include proper rate limiting, wildcard configuration, and tokenizer setup.
- Refactored `initialize_typeahead` to include a more robust dataset configuration with templates for rendering suggestions.
- Fixed DOM element access in the `on:input` handler to ensure proper interaction with the input element.
- Simplified the `remote_fn` logic in `initialize_bloodhound` for fetching and syncing suggestions.
- Added error handling and logging for better debugging during Typeahead initialization.
- Ensured closures are properly registered in the global scope to handle Typeahead events.
- Updated the JavaScript initialization script to use bracket notation for safer handler invocation.
- Removed the additional inclusion of `corejs-typeahead` script from the `<head>` section.
2025-04-08 17:55:46 +03:00
5ca277ee80 feat(typeahead): Improve typeahead initialization and event handling 2025-04-08 02:30:58 +03:00
d6661c2ac9 feat(typeahead): use typeahead for name input field 2025-04-04 18:47:12 +03:00
4de14bb48b feat(input): update name input field to search for wiki suggestions without search wiki button 2025-04-02 22:07:24 +03:00
e893e14c26 Merge pull request 'Merge pull request 'dev' (#4) from dev into main' (#5) from main into dev
Reviewed-on: #5
2025-04-01 13:17:26 +00:00
303b713d59 fix(properties): fetch prop values alongside prop ids and labels 2025-04-01 14:43:36 +03:00
46e9b4e48e docs(readme): document properties data flow 2025-04-01 00:02:35 +03:00
8c7946091f fix(labels): display correct labels in dropdown and when properties are added 2025-03-31 23:50:35 +03:00
9d21d9999f fix(labels): add set_is_fetching_labels signal to fetch_item_properties label to fix error 2025-03-31 18:07:36 +03:00
40bb35d6a8 feat(labels): add state to track when labels are being fetched(in progress) 2025-03-31 17:36:46 +03:00
ef7245b716 fix(labels): add property cache and refactor fetch_item_properties function to use it 2025-03-27 15:31:58 +03:00
5c3070bfc0 fix(labels): update set_property_labels signal in fetch_item_properties function to avoid repetitive label fetches 2025-03-26 14:48:58 +03:00
a9611a08e4 Merge branch 'dev' of forge.ftt.gmbh:ryanmwangi/Compware into dev 2025-03-25 15:52:40 +03:00
ebb1afd1af fix(properties): show property labels in custom property autocomplete dropdown 2025-03-25 15:51:49 +03:00
734e710d8f Merge pull request 'dev' (#4) from dev into main
Reviewed-on: #4
2025-03-24 20:57:41 +00:00
1f52901885 Merge branch 'main' into dev 2025-03-24 20:56:53 +00:00
f0356e9d0c Merge pull request 'Add CompareWare link to Readme' (#3) from readme-link into main
Reviewed-on: #3
2025-03-21 13:33:17 +00:00
69430fae8a fix(db): clean up property deletion to be scoped per url 2025-03-21 16:21:19 +03:00
fe98c56872 fix(db): check if the global_item_id column exists before trying to add it. 2025-03-21 01:45:16 +03:00
12f4043e83 feat(db): add global_item_id to track items accross urls 2025-03-21 01:32:32 +03:00
9a7a8e575c Add CompareWare link to Readme 2025-03-20 12:29:44 +00:00
3126d90f5a fix(auto search): retrace my steps to resolve ownership errors 2025-03-18 23:47:47 +03:00
8c1cab3615 Merge branch 'dev' of forge.ftt.gmbh:ryanmwangi/Compware into dev 2025-03-17 22:41:42 +03:00
85dce655e4 feat(auto-search): remove search button and have autosearch while typing 2025-03-17 22:41:23 +03:00
cdca9e7faa Merge branch 'main' of forge.ftt.gmbh:ryanmwangi/Compware into main 2025-03-15 16:53:56 +03:00
5465811781 docs(README): update readme with steps of docker deployment. 2025-03-15 16:53:18 +03:00
d6d0ab18ec Merge pull request 'dev' (#2) from dev into main
Reviewed-on: #2
2025-03-15 13:33:30 +00:00
d806c0c5dc Merge branch 'main' into dev 2025-03-15 13:33:10 +00:00