Skip to content

Update dependencies and improve UI layout and functionality#10

Open
AndresCdo wants to merge 25 commits intonilgradisnik:masterfrom
AndresCdo:master
Open

Update dependencies and improve UI layout and functionality#10
AndresCdo wants to merge 25 commits intonilgradisnik:masterfrom
AndresCdo:master

Conversation

@AndresCdo
Copy link

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.

@nilgradisnik
Copy link
Owner

Hey, thanks for doing this work 🙏 I'll take a look at these changes soon.

@AndresCdo
Copy link
Author

Hey, thanks for doing this work 🙏 I'll take a look at these changes soon.

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.

AndresCdo and others added 11 commits October 19, 2025 12:40
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
@AndresCdo
Copy link
Author

Hi @nilgradisnik
This PR is ready to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants