Commit graph

61 commits

Author SHA1 Message Date
23cd674e31 feat(item_list): implement querying using GRAPHQL 2025-02-01 05:28:36 +03:00
af921088f9 feat(wikidata): enhance property value parsing and improve time handling
- Refactor `fetch_item_properties` to handle nested JSON types efficiently
- Introduce `parse_property_value` for structured processing of various value types
  - Handle time values with varying precision (year, month, day)
  - Parse and format dates from RFC 3339 format
  - Support fetching and displaying labels for Wikidata entity references
- Replace raw JSON object handling with cleaner structured parsing
- Update property label fetching and signal updates for better UI data synchronization
2025-01-30 14:59:55 +03:00
a40e9c98c4 feat(Item_list): auto-add property on dropdown selection
-No need for an "Add Property" button
2025-01-29 19:42:53 +03:00
2d072f3303 feat(item_list): move delete buttons next to item name 2025-01-29 16:07:10 +03:00
792b4daf04 feat(item_list): put item names into the header 2025-01-29 15:51:11 +03:00
e0c49ffa86 build(merge): merge branch 'db' into main 2025-01-29 15:30:35 +03:00
1318319ad1 fix(properties): reflect added properties in real time in the ui 2025-01-28 23:45:27 +03:00
ac8eb8118d fix(item_list):initialize with one empty item if the database is empty 2025-01-28 20:44:52 +03:00
68b458df5e feat(db): enable user to delete items and properties from the database. 2025-01-28 14:36:17 +03:00
afa3bd3ece feat(Item_list): update ItemsList component to include delete button for property input fields 2025-01-28 02:43:07 +03:00
c38f19d76c feat(labels): persist property labels on refresh. 2025-01-27 16:48:28 +03:00
3fa56abc83 feat(db): persist custom properties from db 2025-01-27 16:34:25 +03:00
e0e5fc49c2 feat(db): load items from database on startup.
-successfully loading names and description
2025-01-24 15:10:25 +03:00
c1207f613d feat(db): add selected properties state and update save_item_to_db function to include selected properties 2025-01-24 02:23:24 +03:00
3ed12c80a6 feat(db): integrate the database with the frontend. 2025-01-23 21:36:30 +03:00
291cb05847 feat(db): run db on backend using actix web 2025-01-22 20:16:43 +03:00
af3f89c561 feat(db): add API endpoint for updating items to db and implement server-side functionality 2025-01-22 14:14:18 +03:00
5bd19803fe feat(ssr): add SSR feature to ItemsList component 2025-01-22 02:50:00 +03:00
29434dc37c feat(db): revert to previous working commit. 2025-01-20 19:14:34 +03:00
dc70316bae fix(db): db debugging (in progress) 2025-01-20 18:49:54 +03:00
4760364491 feat(reviews): remove reviews from Item struct 2025-01-17 18:52:20 +03:00
a99b5164d8 feat(item_list): add property labels fetching and displaying in ItemsList component 2025-01-16 15:06:16 +03:00
1f81eae135 feat(items_list): populate new item cells with related property values based on their wikidata_id 2025-01-16 02:29:27 +03:00
765227e7aa fix(items_list): modify add_property to fetch and populate relevant values per item 2025-01-16 01:43:51 +03:00
8fed7eeafe feat(items_list): add cache to store fetched properties and use it for auto completion of newly added properties 2025-01-14 17:25:57 +03:00
ca97f74854 feat(item list): fetch properties of selected wiki suggestions. 2025-01-14 14:48:02 +03:00
d40dfd0e86 feat(tags): remove tags section 2025-01-13 19:24:44 +03:00
430cf3e6df feat(editable cells): add support for multiple input types in EditableCell component
- Introduced `InputType` enum to support both `Text` and `TextArea` input types.
- Updated `EditableCell` component to accept `input_type` as a parameter.
- Added logic to handle input events for both `Text` and `TextArea` fields.
- Implemented `textarea_ref` to support `<textarea>` elements.
- Used match expressions to dynamically render either `<input>` or `<textarea>` based on the `input_type` provided.
2025-01-10 20:56:25 +03:00
82eb91a2fe fix(item_list): make the show_suggestions signal more specific to each name field 2025-01-08 15:18:00 +03:00
123d3ef271 feat(item_list): add search button for Wikidata suggestions 2025-01-08 14:58:12 +03:00
139ea0805c feat(items-list): enhance the ItemsList component to integrate focus and blur signal handling for suggestions from Wikidata 2025-01-08 03:02:05 +03:00
e36a24b9d0 feat(editable cell): Add focus and blur handling for EditableCell suggestions
-Added on_focus and on_blur props to the EditableCell component to handle focus and blur events.
2025-01-08 02:42:42 +03:00
76f5636071 fix(ItemsList): scope Wikidata suggestions to focused cell
- Modified `fetch_wikidata_suggestions` to accept a `key` parameter, tying suggestions to specific cells.
- Updated state to use `HashMap<String, Vec<WikidataSuggestion>>` for per-cell suggestion storage.
- Adjusted rendering logic to only display suggestions for the currently focused cell.
2025-01-07 15:52:25 +03:00
8de9623a0d style(editable_cell): add styling to have a grid layout. 2025-01-06 16:06:06 +03:00
0e15699b13 fix(EditableCell): improve seamless input handling and focus management
- Resolved issues with input handling to ensure smoother updates on focus and blur.
- Introduced `commit_input` to properly commit input values on blur or enter.
- Added logging to aid debugging and track input events.
2025-01-06 15:33:26 +03:00
4f9d423a5c fix(item_list): enhance ItemsList component with centralized focus management for EditableCell
- Added `focused_cell` and `set_focused_cell` signals to handle global focus state across cells.
- Updated `EditableCell` usage in `ItemsList` to utilize `Arc<String>` keys for efficient reference sharing.
- Simplified focus handling by removing local state tracking and integrating centralized focus management.
- Ensured better UX by making the currently edited cell regain focus after state updates.
- Improved dynamic property handling by applying the new focus mechanism to both default and custom properties.
2025-01-04 22:30:32 +03:00
25195d6753 fix(editable cell): (in progress) improve EditableCell component to handle focus management with shared state
- Updated `EditableCell` to use `Arc<String>` for the `key` prop to ensure efficient reference handling.
- Added `focused_cell` and `set_focused_cell` signals to manage focus state across components.
- Replaced local focus tracking with a global mechanism to handle input focus changes, improving UX consistency.
- Introduced `NodeRef` for direct input element manipulation, ensuring the focused cell regains focus after state updates.
2025-01-04 22:25:28 +03:00
08821aaaaf feat(items-list): enable dynamic custom properties
- Edited ItemsList to support dynamic custom properties for each item, managed via HashMap.
- Introduced a UI input for users to add new properties dynamically.
2025-01-03 14:15:17 +03:00
593bee20a7 feat(items-list)(v0.1.0): redesign table layout to display properties as rows and items as columns 2025-01-02 16:13:51 +03:00
9f28d30d48 feat(list): Add initial empty row and auto-add new row on editing last row 2024-12-24 15:26:52 +03:00
9da8b03de2 feat(maintain focus on cells): maintain focus while typing in cells; in progress 2024-12-24 14:27:32 +03:00
8b89b635a8 feat(items-list): enhance Wikidata integration with auto-fill functionality 2024-12-23 22:54:51 +03:00
e9b4c12a6d feat(autocomplete name): autofill name with wikidata suggestions 2024-12-23 17:56:34 +03:00
22e6ae38d4 fix(form_list): fix mismatched parenthesis on lift_form.rs 2024-12-23 14:49:12 +03:00
16b04fcc1e feat(cells): make cells editable (debugging) 2024-12-20 18:24:20 +03:00
23b63ebecd feat(list): make spreadsheet like ui 2024-12-20 02:56:42 +03:00
2733fc958b feat(items): integrate Wikidata API for external data enrichment
- Added functionality to fetch additional attributes for selected items from Wikidata.
- Defined structures for handling Wikidata API responses.
- Incorporated async data fetching using futures and `gloo_net::http::Request`.
- Enhanced the UI with a button to fetch external data for comparison.
- Updated the comparison table to include external descriptions retrieved from Wikidata.
2024-12-18 21:49:26 +03:00
da720a48d3 refactor(item_list): Refactor ItemsList component to improve readability and reuse.
- Extracted item selection toggle logic into a dedicated `toggle_selection` function.
- Simplified access to item properties in views by using references (`&`).
- Improved code clarity and maintainability by reducing inline complexity.
2024-12-18 16:00:40 +03:00
6947d58c7c feat(form): add form validation for name and description fields 2024-12-18 14:52:30 +03:00
e8fd578b77 feat(comparison table): add comparison table to compare checked items. 2024-12-17 16:14:49 +03:00