Update dependencies and improve UI layout and functionality#10
Open
AndresCdo wants to merge 25 commits intonilgradisnik:masterfrom
Open
Update dependencies and improve UI layout and functionality#10AndresCdo wants to merge 25 commits intonilgradisnik:masterfrom
AndresCdo wants to merge 25 commits intonilgradisnik:masterfrom
Conversation
…ic files, and temporary files
Update dependencies and improve UI layout and functionality
Owner
|
Hey, thanks for doing this work 🙏 I'll take a look at these changes soon. |
Author
I noticed your repo and was impressed with the work you've done. It seemed a bit outdated, so I couldn't resist contributing. I've made some important updates, but I completely understand if it takes a while for you to review them—or even if you decide not to incorporate them. |
Modernize project toolchain and align crate versions with current gtk-rs releases. Switches to Rust 2021 edition, upgrades GTK/GIO/GLib and WebKit bindings, and tidies several crate versions while removing an obsolete dependency. These updates improve compatibility with newer platform APIs and dependency ecosystems but may require small API adjustments where upstream crates introduced breaking changes.
Moves UI construction from a Glade builder to programmatic GTK widget creation to simplify UI management and reduce runtime dependencies. Replaces SourceView with gtk::TextBuffer/TextView and adapts utility helpers to the new buffer API, removing SourceView-specific configuration and related dependencies. Consolidates file Open/Save/About/Quit into gio SimpleActions, adds native file chooser dialogs, header bar buttons, and a menubar, and wires UI controls to the unified actions. Simplifies application startup by removing redundant extern crate usage, updating the clone macro for current closure patterns, and streamlining the preview rendering hookup. Also removes the previous WebView navigation policy that attempted to open links externally. Improves maintainability and portability by reducing external dependencies and centralizing UI/action logic while preserving markdown preview functionality.
Expands CI to include lint, build, test and format jobs and broadens triggers to run on master/dev and relevant path changes. Adds concurrency to avoid duplicate runs, sets useful Rust env vars, and introduces caching for cargo registry/git/target to improve performance. Introduces a stable/beta build matrix, runs debug and release builds, enforces clippy and rustfmt checks, and installs native GTK/WebKit dependencies so CI mirrors local build requirements. Improves reliability and speed of validation while surfacing lint/format issues earlier in the workflow.
Reformats imports and groups related use statements, wraps long lines, and removes stray whitespace. Reorders crate declarations and adjusts a helper to use chained method calls for cleaner formatting. Improves readability and code consistency without changing program behavior.
Replaces concrete PathBuf parameters with more flexible Path references in utility functions to allow borrowing of path values and avoid unnecessary ownership. Adjusts imports and minor call sites to accept &Path, simplifying API usage and improving ergonomics for callers.
Allows the beta Rust matrix job to continue-on-error in the CI workflow to accommodate a known glib 0.18.5 trait-bound issue on some Rust versions. Keeps the stable run required to pass so overall build integrity is maintained and adds inline notes documenting the workaround.
Regenerates the lockfile to update and align project dependencies. Upgrades many crates (e.g. clap → v4, syn → v2, proc-macro2, serde, gtk/gio → 0.18, wasm-bindgen, windows-sys) and adds/aligns transitive dependencies to resolve version conflicts. Brings the lockfile to the newer lockfile format and pulls in bug fixes, security patches, and improved compatibility with recent Rust toolchains and libraries. No source logic changes are included.
Adds a visible label to the Quit entry in the File menu so it no longer appears blank. Improves menu clarity and usability by preventing a confusing empty menu item.
Modernize Rust project and improve UI management
Author
|
Hi @nilgradisnik |
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 updates the dependencies of the project, including the GTK version, sourceview, comrak, horrorshow, and webkit2gtk. It also improves the UI layout and functionality by updating the gtk-ui.glade file. Additionally, it includes refactoring of the main.rs and utils.rs files for better code organization. The README file has been updated with instructions on how to build the project from source. A rust.yml file has been created to set up a GitHub Actions workflow for building and testing the project. Finally, a merge commit from the dev branch has been included in this pull request.