Comply with Obsidian coding patterns#5
Merged
Conversation
- Remove 'lockdown-' prefix from all command IDs - Obsidian handles command ID namespacing automatically - Affects 9 commands: toggle-lock, lock, unlock, set-root-password, show-locked-files, change-password, unlock-all, lock-folder, unlock-folder
- Change 'Password Required' to 'Password required' - Change 'Confirm Password' to 'Confirm password' - Change 'Locked Items Manager' to 'Locked items manager' - Change 'Session timeout: Locking...' to 'Session timeout: locking...' - Change 'Warning: Could not...' to 'Warning: could not...' - Capitalize 'Markdown' in user-facing messages
- Replace element.style.* with CSS classes for better theming - Add CSS classes: ld-overlay-container, ld-overlay-container-isolated, ld-file-explorer-indicator--encrypted - Use addClass/removeClass instead of direct style manipulation - Update status bar to use ld-status-bar class
🔍 Code Quality Report
✅ All checks passed!Code quality meets all standards. Ready to merge! 🚀 |
✅ Quality Gate SummaryChecks
PR Stats
All quality checks passed! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request primarily focuses on refactoring and improving code consistency, command naming, and UI styling for the Lockdown plugin. The most significant changes include standardizing command IDs, improving asynchronous handling, refining UI feedback and styling, and enhancing code readability. Below are the top changes grouped by theme:
Command Naming and Consistency
main.ts(e.g.,lockdown-toggle-lock→toggle-lock,lockdown-lock→lock) for clarity and consistency. [1] [2]Async Handling and Code Readability
voidoperator in multiple places to clarify intentional fire-and-forget behavior and avoid unhandled promise warnings (e.g.,void this.handleSessionTimeout(),void this.lockFile(...), etc.). [1] [2] [3] [4] [5]asyncusage and improved error handling by catching errors without variable assignment. [1] [2] [3] [4] [5] [6] [7]UI and Styling Improvements
Locked items manager,Password required). [1] [2] [3]User Feedback and Messages
Settings UI Enhancement
These changes collectively improve code maintainability, user experience, and plugin reliability.