Releases: PxaMMaxP/obsidian-prj
Releases · PxaMMaxP/obsidian-prj
Release 0.0.36
Update version to 0.0.36 with improvements and cleanup - Incremented plugin version to 0.0.36 across project files for new release. - Enhanced TextareaComponent to handle `Enter` keypress, inserting a newline without losing focus. - Deprecated custom file cache getter in favor of native Obsidian API call `app.vault.getFiles()` for performance and maintainability. - Introduced HTML detection utility function to the Helper class. - Refactored StaticDocumentModel to use native Obsidian API call directly, aligning with deprecation of the custom cache getter. - Updated styles to ensure correct text presentation in contenteditable text areas with proper white-space handling.
Release 0.0.35
Version bump to V0.0.35
Release 0.0.34
Enhancements to Suggestion Feature and UI Updates (#23) * Optimize suggestion filtering and UI updates Refactored suggestion logic in `DocumentComponents` to delegate suggestion retrieval to a new model `StaticDocumentModel`, improving separation of concerns and encapsulation. This change includes filtering and mapping logic adjustments to cater to case-insensitive input matching and expanding the maximally shown suggestions to 100, enhancing the usability of the suggestion feature. Removed obsolete `datalist` HTML elements and related DOM interactions for suggestion handling in `TextComponent` and `TextareaComponent`. Introduced a new `SuggestionComponent` class to centralize suggestion UI handling, allowing for a more structured and maintainable approach to rendering suggestions. This change improves the extensibility and encapsulation of suggestion rendering. Commented out presentation and input container toggling in `BaseComponent` which suggests a move towards a different UI update strategy, possibly transitioning towards a pure CSS-based show/hide logic for elements during editing mode. Further investigation or follow-up changes would be needed to clarify and finalize this approach. Restructured SCSS by moving editable data view styles to a dedicated partial, `_editableDataView.scss`, organizing the styles better and facilitating easier maintenance. This cleanup helps with the segregation of styles making the stylesheets more manageable. It is still pending: - Refactorization of the SuggestionComponent - Conversion of the other components, - and adjustments to the BaseComponent to be able to handle both types of components. * Use fallback for missing document description Modified document description retrieval to use a null-coalescing operator, ensuring an empty string is assigned when the description is unavailable. This change prevents potential exceptions during document component rendering when the description field is absent in the data model. * Enhanced suggestion logic and UI toggle Refactored the suggestion component to improve the clarity and maintainability of the code by introducing a structured comment system that details the functionality, parameters, and expected behavior of the component's methods and properties. This facilitation of understanding not only benefits current maintenance but also aids future developers in onboarding. The key behavioral change was a shift in the suggestion index logic. Instead of relying on a boolean flag paired with a last index variable, the new implementation uses a dedicated index and a scrolling mode flag. The functional benefits of this are twofold: it simplifies the state management within the component and makes the suggestion cycling behavior clearer and more predictable. On the UI side, edit mode interaction was polished, ensuring that presentation and input container toggling occurs efficiently upon mode transitions. The removal of commented-out code results in cleaner and more readable codebase. To support these enhancements, unnecessary suggestion list manipulation methods were purged from the TextComponent, streamlining the component's responsibilities and leaning on the improved SuggestionComponent to handle suggestion-related tasks wholly. All these changes collectively foster a more robust, streamlined, and understandable component architecture, optimizing the responsiveness of the suggestion system and the UI's edit/view mode transition, resulting in an improved UX. * Version bump to V0.0.34
Release 0.0.33
Improvement/create new metadata modal (#22) * Enhanced metadata file creation logic Refined `evaluateForm` method to support editing existing metadata files or creating new ones. Introduced logic to handle file linkage, and to populate new DocumentModel instances with form result data. Now, if an existing file is passed, it's updated with the synchronized metadata; otherwise, a new file is created using a specified template if available. * Renamed and updated file link methods Refactored `DocumentModel` methods for clarity and added return value to `setLinkedFile`. The `getFile` method is renamed to `getLinkedFile` to better represent its functionality. The `setLinkedFile` method now returns the constructed wikilink string for potential further use, while previously it returned nothing. Calls to the old `getFile` have been updated accordingly in `StaticDocumentModel` to maintain consistency. * Enhanced data setting logic in FileModel Refined the setter logic for `_data` to preserve existing values when an `undefined` is passed, and to explicitly clear them when a `null` is provided. This change improves data handling by ensuring that `undefined` values do not overwrite current data, allowing for more precise updates to the FileModel’s state. * Refactor transaction handling and model initialization Refactored the FileModel and TransactionModel classes to streamline the transaction handling process. In FileModel, simplified setting of the file property and consolidated the creation of an empty object with default values directly into the transaction changes object, removing the need for iteratively updating key-value pairs. Enhanced the TransactionModel by immediately starting a transaction if the `writeChanges` callback is not provided during instantiation, emphasizing the intent to always be in a transactional state. Further, introduced a clear separation of concerns by adding methods to properly finish or abort ongoing transactions based on the presence or emptiness of changes. Improved error handling in the asynchronous `writeChanges` callback, now catching errors and logging them properly, as well as clarifying the function's execution flow with a boolean return value. This adjustment allows for better debugging and maintenance. These enhancements aim to improve code clarity, reduce complexity, and enforce a more predictable and reliable transaction flow throughout the system. * Ensure cache consistency on file update Added a call to invalidateMetadataCacheArray after updating a file entry in MetadataCache to ensure that the cache remains consistent. This change addresses potential stale data when the cache is accessed following a file update. Version bump to V0.0.33
Release 0.0.32
Bump plugin version; disable file event registration Updated manifest, package, and versions to new patch version 0.0.32. Disabled file event handling within `FileCache` constructor reflecting a decision to avoid unnecessary event processing, as indicated by the added remark. This change may improve performance by reducing overhead, especially if events were not being utilized.
Release 0.0.31
Integrate deprecation plugin and refactor file lookups - Added 'eslint-plugin-deprecation' to track and enforce deprecation rules within the codebase - Enhanced ESLint configuration to check against deprecated code usage - Refined file search methods in FileCache to use 'findFileByLinkText' for resolving file links - Updated dependent components and models to utilize the new file lookup method - Incremented package version to reflect new features and improvements - Deprecated older file lookup methods with advisory comments and recommendations for alternatives - Version bump to V0.0.31
Release 0.0.30
Implement/metadata-cache-events (#21) * Implement ILogger Interface for Logging System Refactored the Logging class to implement the newly defined ILogger interface for a more structured and formal logging approach. The getLogger method now returns an instance of ILogger, ensuring consistent logging method signatures and enabling potential future extensions where different loggers conforming to the ILogger interface can be used interchangeably. This enhances maintainability and supports adherence to the dependency inversion principle. * Add event handling system with registration and firing Introduced a new events system via the GenericEvents class to facilitate event registration, deregistration, and firing within the application. This system allows defining events with associated types for data and return values, enabling a clear and type-safe handling of app-wide events. Implementations provide registration and deregistration methods, ensuring that events can be dynamically managed at runtime. The fireEvent method executes registered callbacks, and the system incorporates an optional logger for debugging purposes. * Implement event system for MetadataCache updates Introduced a new event handling mechanism within the MetadataCache class, allowing for the registration and firing of events when plugin-related file metadata changes. Notably, an event is emitted for the 'prj-task-management-changed-status' scenario, enabling dynamic reaction to task status updates. This feature facilitates the extensibility of the metadata cache and improves its integration capabilities with task-related plugin functionalities. Additionally, the process of metadata change detection has been refined to include event emission when specific conditions are met. * Add task status file sync on change Implemented syncing of task files to their respective status directories when status changes are detected. A listener on `prj-task-management-changed-status` now triggers `syncStatusToPath`, moving files to an 'Archiv' directory for completed tasks or to the main status folder for other valid statuses. Ensured that file relocations only occur when the new path differs from the current one, logging each action for debugging purposes. Additionally, refactored `StaticPrjTaskManagementModel` to include missing imports and enhance code maintainability. * Version bump to V0.0.30
Release 0.0.29
Refactor SingletonBlockProcessor accessor and enhance observer logic - Transitioned from a method `getSingletoneContainer` to a getter property `singletoneContainer` in `SingletonBlockProcessor` to simplify access to the singleton container. - Updated relevant usage in `MarkdownBlockProcessor` to work with the new property. - Enhanced the observer logic within `SingletonBlockProcessor` to address cases where sibling blocks have no child elements by cloning and replacing the container, ensuring proper observer handling. - Adjusted the task management logic to define distinct return values for tasks with no due date in `StaticPrjTaskManagementModel`, improving task prioritization clarity. - Version bump to V0.0.29
Release 0.0.28
Upgrade project dependencies and improve localization - Updated package versions in package-lock.json for better security and performance. - Created a new modal for adding annotations, improving user interaction. - Refactored language translations into a dedicated folder for better organization. - Enhanced models by moving shared logic to FileModel, reducing duplication. - Adjusted TaskModel to enrich task-related functionalities for user tasks. - Streamlined BaseModel into FileModel for a clearer inheritance structure. - Improved code quality by renaming and cleaning up methods and properties. - Adjusted directory references for translations to reflect new structure. - Made Tag.getValidTags method static as it does not rely on instance state. - Version bump to V0.0.28
Release 0.0.27
Merge pull request #20 from PxaMMaxP/implement/singleton-block-processor Refactoring of MarkdownBlockProcessor for Improved Code Structure