Incremented version number to prepare for the new release, ensuring the changes made are properly reflected and versioned. This update helps maintain proper version tracking for future development and release cycles.
Introduce a new route to handle redirects for different Wikimedia project domains. The route dynamically identifies the target project and language based on the domain name and redirects accordingly. If the project is not found, it displays a custom error page.
Enhances user navigation across Wikimedia subdomains, improving user experience and simplifying URL management. Addresses redirect issues for integration with LibRedirect (https://codeberg.org/LibRedirect/browser_extension/issues/142)
Updated single quote usage in URL generation for consistency and readability in `wiki_article` function. This improves code maintainability and avoids potential issues with character escaping.
Switched double quotes to single quotes in URL handling code for better consistency and to avoid potential issues with escaping characters. This ensures the proper construction of the API request URL, improving reliability when fetching wiki articles.
Included a new public instance of Wikimore provided by bloat.cat based in Germany. This update helps users find more public instances for better accessibility and redundancy.
Closes#39
Removed the unused exception variable from the error handling block during MediaWiki API request. This helps in reducing potential future linting errors and maintains cleaner code. No functional changes.
Introduced caching for license data retrieved from the MediaWiki API. This avoids redundant API requests by storing the license information for each base URL. Enhances performance and reduces the risk of hitting request limits or encountering errors due to multiple API calls.
Extended the home route to accept optional project and language
parameters to dynamically render content based on these inputs.
Improved handling within the article fetching function, including
validating projects and languages, adding variant headers, and
following redirects conditionally. Updated links to accommodate
internal, external, and interwiki links, with structured checks
for main page redirections. Removed redundant meta links and edit
sections to clean up the rendered content. Added proxying for images
and videos, converted category elements to links, and improved class
assignments for reference links. Ensured right-to-left languages are
handled appropriately.
Fixes#29.
Updated URL construction to correct escaping order of title and query parameters using `escape` after `quote`. This ensures proper encoding of characters and prevents potential errors when fetching articles and search results from the API.
Additionally, added a debug log for search result fetching URL to aid in troubleshooting.
Fixes#36.
Added functionality to fetch and display license information for wiki
articles. This enhancement provides users with clarity on content usage
permissions by showing a link to the article's license in the footer.
Fixes#35.
Added explicit setting for text direction to RTL in the HTML body
for Kurdish Arabic variant articles. This change ensures proper
display alignment for right-to-left languages, addressing layout
issues arising from API response inconsistencies.
Changed query parameter type to 'path' in search endpoint to ensure that slashes in search queries are correctly handled. This resolves issues with queries containing slashes not being processed properly.
Fixes#37.
Added a try-except block around the search results API call to handle potential errors gracefully. Now, if an exception occurs, an error message is logged, and the user is redirected to an error page with a 500 status code. This improves user experience by providing clear feedback when the search functionality fails.
Unset the float property for images within the infobox with the class 'mw-default-size'. This resolves layout issues where images were not aligning correctly in certain contexts. Ensures more consistent and expected rendering of infobox content.
Deleted .noprint class from stylesheet as its intent is unclear, simplifying the CSS file and reducing potential maintenance overhead. This change helps streamline the styling rules, making the codebase cleaner and easier to manage.
Removed redundant general styling and adjusted the widths in several elements to improve responsive behavior. Enhanced infobox design with a distinct title section for better readability and visual separation. These changes address layout issues on smaller screens and improve overall user experience.
Fixes#14, maybe?
Enhanced error handling for fetching Wikimedia projects with specific log messages for various exceptions including JSON decode, HTTP error, and URL error. Introduced support for "special" Wikimedia projects and updated functions to handle missing base URLs by checking special projects. Added detailed debug logging in `wiki_article` function for debugging failed article fetches.
style: add CSS rules for Wikidata content
Implemented new CSS styles for improved display and readability of Wikidata content elements such as entity views, statements, and references. These styles enhance the user interface, making it cleaner and more user-friendly.
Fixes#27.
Removed the default Flask logger to prevent duplicate logging entries.
Refined log output by adding a custom handler and formatter to ensure logs
are consistent and properly formatted.
Added functionality in `app.py` to propagate `data-mw-group` attribute classes to `mw-reflink-text` spans, enhancing footnote grouping. Updated CSS to properly style these footnotes, accounting for various numeral systems (alpha, roman, decimal) and ensuring consistent display of references.
Fixes#33.
Added a placeholder for the link to the comments section in the CSS to support a future implementation of comments retrieval in the backend. The placeholder includes styles for displaying a comment request link and setting its font properties.
Ref: #22
Updated CSS to ensure .category-link applies only to the last
section element. This change prevents unintended styling of
elements in other sections, enhancing the page's visual accuracy. Fixes#30.
Modified the display property of code blocks from block to inline-block to improve layout consistency and handle overflow-x better. This ensures better alignment with surrounding elements and more predictable rendering behavior. No visible design alterations should occur.
Ensure slashes in Wiki article titles are URL encoded to prevent request errors. This change resolves issues where titles containing slashes could break the API calls.
Fixes#23
Added comprehensive styling for Wikisource index and remarks
content to enhance visual consistency and user experience.
Key updates include container layouts, text formatting, image
display, collapsible sections, and link styles. Adjusted
styles for better responsiveness on smaller devices.
Addresses issues with unattractive and inconsistent layout
in Wikisource index.
Updated the error handling to address cases where the body is missing in the wiki article response. Instead of returning an error page, the code now constructs a default HTML structure and uses BeautifulSoup to parse it, ensuring the body content can still be located and processed. This improves robustness and user experience when dealing with incomplete or malformed article data.
Fixes#24.
Add a check for a missing body element when parsing wiki articles and return an error message with a 500 status code if the body is not found. This improves error handling and prevents crashes caused by unexpected HTML structures.
Extended CSS with new styling rules for evolution charts, enhancing the
visual presentation and interactivity of clade elements. Improved gallery
layout with responsive styling for a more user-friendly and aesthetically
pleasing experience, especially on smaller screens.
Fixes#20
Introduced a new CSS class for listing metadata to ensure consistent font size and color across the UI. This enhances the readability of metadata elements and aligns with the overall design aesthetics.
Fixes#26
Added styles for .mw-file-element to ensure media files are centered, displayed as blocks, and resized proportionally to fit within their containers. This enhances layout consistency across the application.
Fixes#14.
Enhanced the display rules for category links by enclosing them in brackets and setting them to be hidden by default outside of sections. Improved infobox image dimensions and alignment to ensure consistent display. Adjusted media queries for larger device padding.
Fixes#12.
- Default values for `lang` and `project` added in `render_template` to ensure consistent rendering parameters.
- Included `lang` and `project` parameters in error and article templates for better context in error messages.
- Enhanced search form in base template to persist selected `lang` and `project` improving user experience.
These changes provide a more consistent and localized user experience by maintaining language and project context across different parts of the application.
Fixes#17.
Transformed specific 'link' elements into anchor tags with improved styling
for better readability and usability. Added CSS styling for category links
to ensure they are displayed inline with appropriate spacing, improving
the user experience.
Added validation to ensure both language and project are selected before proceeding with the search. Redirects to the homepage if the query is empty. Enhanced error handling in index redirect function to catch invalid project/language combinations and inform users appropriately.
Resolves issues with user experience and input handling.
Enhanced the code by adding type annotations and comprehensive
docstrings for better clarity and maintainability. The changes
include detailed explanations of return types and parameters for
all major functions and routes in the application. Additionally,
reordered imports for better readability and added a new typing
import to support the annotations.
These improvements facilitate easier understanding and usage of
the codebase, align with best practices, and provide hints for
static type checkers, leading to fewer runtime errors.
Addressed an edge case where articles with the 'ku-arab' variant were displayed in left-to-right (LTR) direction despite being in Arabic script. Added logic to force right-to-left (RTL) direction for such cases, ensuring correct display.
Resolves issue with incorrect article formatting.
Added a new route to handle redirects from /<project>/<lang>/w/index.php. The redirect fetches the main page from the Wiki API and redirects to it. This improves user navigation by dynamically redirecting to the main page of the relevant project and language.
Added try-except block to handle HTTP errors when fetching wiki articles. Specifically, handle 404 errors with a user-friendly "Article not found" message and log other errors with a generic error message displayed to the user. This enhances user experience by providing clearer feedback and more robust error logging.
Centralized the addition of 'wikimedia_projects' and 'languages'
in templates by wrapping 'render_template' from Flask. This
reduces repetition and simplifies controller functions. Updated
error templates to provide clearer messages.
Updated the search functionality to use MediaWiki's API endpoint, enhancing query performance and accuracy. Adjusted the URL format to align with the new API endpoint specifications and modified the parsing logic to extract search results accordingly. This transition provides more reliable and structured search results.
Replaced outdated Wikimedia API endpoints with updated REST API endpoints for fetching articles and search results. Introduced custom headers to include User-Agent for requests, which helps in identifying the source of traffic. Enhanced error handling for article fetch by changing the container element from 'body' to 'div' and handling potential language variants in requests.
Ref: #16
Enhanced article rendering to support right-to-left (RTL) languages. Updated templates, styles, and HTML to conditionally apply RTL styling based on content direction. Improved readability and user experience for RTL language users.
Relates: #16
Added a new CSS class to highlight links to non-existent pages in red and appended a descriptive text indicator. This improves user navigation by clearly distinguishing between existing and non-existing pages, reducing confusion and enhancing the overall user experience.
Refine wiki article URL parsing to handle paths with minimal segments and ensure proper language and project mapping. Updated href assignment to use `url_for` for more precise route generation. These changes improve the accuracy and reliability of linking external wiki pages within the project ecosystem.
Fixes#13.
Encoded titles using `quote` to handle Unicode characters correctly in API requests. Added error handling for cases where article content is not found, returning a 404 page with an appropriate message. This ensures a more resilient and user-friendly application.
Fixed#15.
Upgraded project version from 0.1.2 to 0.1.3 to include recent updates and improvements. This prepares the project for the next release cycle, ensuring compatibility and stability for the new features and bug fixes introduced since the last version.
Moved comments to their own lines to improve readability and maintainability of the CSS code. This change separates the comments from the declarations, making it easier for developers to understand the purpose of each style rule at a glance.
Updated the sidebar background color, border, and various styles for better aesthetics and usability. Added styling for titles, images, content links, and lists within the sidebar. Introduced collapsible sections with smooth transitions to improve the user experience by allowing users to manage sidebar content visibility. These changes enhance readability and interactivity.
Introduced .side-box and related classes to enhance the styling
and layout of side boxes. This includes background color, border,
padding, margin, float, and display properties.
Also added media queries to ensure side-box responsiveness on
devices with max widths of 768px and 480px.
Enhances page design, providing a more flexible and visually
consistent user interface. Fixes#11.