- Implement lazy loading for images in various views
- Update image preview method to use medium size
- Cache latest arts to improve performance
These changes enhance the user experience by reducing initial
load times and improving performance. Lazy loading ensures that
images are only loaded when they are in the viewport, which
saves bandwidth and speeds up page rendering.
- Introduce a new before_action to set the default canonical URL
- Implement set_canonical_url method to manage canonical URLs
- Update application helper to use the canonical URL for meta tags
This change enhances SEO by ensuring that the canonical URL is set
correctly for each page, preventing duplicate content issues. The
canonical URL is derived from the original request URL, excluding
query parameters.
- Change description to use @weather_art.prompt instead of
a translated string with multiple parameters.
- Update image_alt method to include the prompt in the
descriptive text.
These changes simplify the metadata generation for weather art and
improve the clarity of the image descriptions by incorporating the
prompt, which may provide users with additional context.
- Modify weather description format in multiple language locale files
- Use full city name in place of just city name in descriptions
- Ensure consistency across all language files for better user experience
These changes standardize the way city weather is presented across
various languages by including more detailed descriptions, thus enhancing
clarity and providing additional context for users.
- Modify get_description method to include an additional
parameter for user context
- Update usage in views to reflect the new parameter
- Adjust temporary description message based on user context
This change enhances the city description generation logic by
allowing differentiation in how the description is provided
depending on whether the calling context is a user. It improves
the user experience while ensuring that non-user contexts
handle descriptions differently. This minor enhancement also
included updating the view to support this new logic.
- Implement meta tags in ArtsController, CitiesController, HomeController, and WeatherArtsController for better SEO.
- Use translation helpers for titles, descriptions, and keywords to improve internationalization support.
- Update default meta tags in ApplicationHelper for consistent site-wide SEO.
These changes enhance the search engine visibility of the application by providing relevant meta information across various pages. Utilizing translation for these fields promotes better support for multiple languages, aligning with localization efforts.
- Change title format to include city and country names
- Comment out default title setting to avoid fallback
This update enhances the title tag used in the meta data of
city pages, providing better search engine optimization by
including both the city name and its country. The change
also comments out the default title with a fallback to avoid
showing an incorrect title when the city details are not
available.
- Deleted KeyVerificationController to simplify the application
- Adjusted order of endpoints in SubmitToIndexnowWorker
- Removed key verification route that was previously handled by the controller
- Added new static text file for key verification instead
This change streamlines the key verification process by removing unnecessary code and implementing a simpler method using a text file.
- Implement KeyVerificationController to handle ID-based key verification.
- Create SubmitToIndexnowWorker for background processing of URL submissions.
- Add routes for key verification and extend functionality of URL submissions to IndexNow.
This commit enhances the application by allowing for verification of API keys and automatic submission of URLs to multiple endpoints, improving SEO and resource accessibility.
- Comment out the popular weather art rendering and related titles in
the home index view.
- Keep the latest weather art section active for display.
This change removes sections of code related to popular and random
weather art, which are not currently in use, while preserving a
clean interface for the latest weather art.
- Modify AWS credentials to use 's3' instead of 'minio' for both production and development environments.
- Update associated initializers, environment configurations, and sitemap generator settings.
- Simplify the configuration retrieval by aligning with new standards for S3.
These changes ensure consistent access to AWS S3 resources and improve maintainability by aligning with updated environment variable practices.
- Update region access to use country.region instead of city.region
- Update subregion access to use country.subregion instead of city.subregion
These changes ensure that the region and subregion are accurately retrieved based on the correct geographical hierarchy, improving the data integrity of the application.
- Include formattedDate in the RSS feed response
- Utilize art.formatted_time method for better date formatting
This change enhances the RSS feed by providing a more user-friendly
formatted date alongside the existing weather date. This allows
clients consuming the RSS feed to display dates in a more readable
format, improving overall usability.
- Change route for RSS feed to use defaults for format
- Add logging to RssController#feed to track request format
These changes improve the clarity of the routing for the RSS feed
and enhance debugging capabilities by logging the request format.
The new route definition ensures that the feed responds correctly
with the default format, while the logging provides insight into
how the feed is being accessed.
- Implement JSON feed generation in the RssController
- Add new API endpoint to serve JSON feed
- Update RSS feed view to include hidden machine-readable data
This commit introduces a new feature that allows the application to
serve weather art data in JSON format. The JSON feed includes
metadata such as the title, description, and additional custom
fields for better integration with other services. The changes
also enhance the existing RSS feed by embedding machine-readable
data within the HTML structure, improving accessibility and
usability for automated systems.
- Include image attachments and city associations in the
RSS feed query to improve performance.
- This change reduces the number of database queries
needed when rendering the feed, addressing potential
N+1 query problems.
- Update cities controller to include state in city data
- Modify results partial to pass pagination parameters
- Adjust index view to support turbo frame actions
These changes improve the pagination functionality by ensuring
that the correct parameters are passed for filtering cities
based on region, country, and state. This enhances the user
experience by providing more relevant data and better
navigation through the city listings.
- Implement state filtering in the CitiesController
- Add new scope `by_state` in the City model
- Update cities index view to include state dropdown
- Add slug column to states for friendly URLs
- Update English locale to include 'All States'
This commit enhances the cities index page by allowing users to
filter cities based on the selected state. It introduces a new
scope in the City model for state filtering and updates the
view to present a dropdown for state selection. Additionally,
it adds a slug column to the states table to support friendly
URLs, improving the overall user experience.
- Change from using `get_object` to `head_object` to check if the
sitemap file exists before attempting to retrieve it.
- Implement a presigned URL for accessing the sitemap, which is valid
for 15 minutes.
- Set cache headers to allow for 1 hour of caching.
- Improved logging for better error tracking and debugging.
This change enhances the efficiency of sitemap retrieval by reducing
unnecessary data transfer and provides a more secure way to access
the sitemaps through presigned URLs. It also improves error handling
by logging specific errors related to missing sitemaps.
- Implement index action to list sitemaps
- Create view for displaying sitemaps with details
- Add helper method for generating sitemap URLs
- Enhance error handling for S3 service errors
This commit introduces a new feature for managing sitemaps in the application. It includes an index view that lists all available sitemaps with their last modified date and size, along with a link to view each sitemap. The error handling for S3 interactions has also been improved to log errors and return appropriate responses.
- Refactor keywords in cities_controller.rb
- Refactor keywords in weather_arts_controller.rb
- Refactor keywords in application.html.erb
This change improves the SEO of the application by updating
keywords to include 'ai' and 'ai web', which are more relevant
and likely to enhance search visibility. The previous keywords
were less optimized for current trends in AI-related searches.
- Modify keywords in cities_controller.rb to include 'ai weather'
- Update keywords in weather_arts_controller.rb to include 'ai weather'
- Change keywords in application.html.erb to include 'ai weather'
These changes enhance the search engine optimization (SEO) of the
application by ensuring that relevant keywords are included in
meta tags, improving visibility for users searching for AI
weather-related content.
- Modify keywords in CitiesController for better
categorization of AI art and weather art.
- Update keywords in WeatherArtsController to include
city country name and description.
- Add keywords in application layout for overall site
SEO improvement.
These changes aim to improve search engine visibility
and better describe the content related to AI-generated
weather art.
- Change string split method from single quotes to double quotes.
This commit improves code consistency by aligning the string
split syntax with the rest of the codebase. No functional
changes were made as a result of this update.
- Update set_locale method to use around_action instead of before_action.
- Modify locale extraction logic to handle more cases, ensuring better fallback handling.
- Improve overall method clarity and maintainability by restructuring code.
This change enhances the localization process by providing a clearer
way to manage locale settings and ensures that it correctly falls back
to the default locale when necessary. It also resolves some edge cases
in locale extraction based on the HTTP_ACCEPT_LANGUAGE header.
- Implemented `extract_locale_from_accept_language_header` to
retrieve the user's preferred language from the request.
- Added `sanitize_locale` for validating and sanitizing locale
inputs against available locales.
- Updated `set_locale` method to prepare for incorporating
browser language preference handling.
These changes enhance the application's ability to set the locale
based on the user's browser settings, paving the way for better
internationalization support.
- Implement locale extraction and fallback mechanism
- Add translation files for English and Chinese
- Update views to use translated strings for various UI elements
This commit introduces support for multiple languages in the application, enhancing accessibility for users. It includes a fallback mechanism for locales and updates to the user interface to display translated content.
- Introduce RssController to handle RSS feed requests
- Add a new route for the RSS feed
- Implement RSS feed view to display weather art
- Update application layout to include RSS feed link
- Set content type for RSS responses
This commit adds an RSS feed feature that allows users to
subscribe to updates on daily AI-generated weather art.
The feed includes the latest weather art and relevant
metadata, enhancing user engagement and accessibility.
- Update SitemapsController to use MinIO credentials
- Modify RefreshSitemapWorker to adapt to MinIO settings
- Change AWS configuration in initializers and storage files
- Add MinIO credentials to credentials.yml.enc
This commit transitions the application from using AWS S3 to MinIO for
storage. It updates all relevant configurations and ensures that the
application can now interact with MinIO seamlessly, including
support for both production and development environments.
- Modify the popular arts query to include city and country relationships
- Ensure the latest arts query also includes necessary associations
- Removed deprecated commented code for clarity
These changes improve data retrieval by establishing better relationships to
cities and their countries. This enhances the availability of data for
the views rendering the arts and keeps the code clean by removing
unnecessary comments.
- Display the latest weather art on the cities index page.
- Update the weather art preview image size to be big.
- Improve image display by using webp format.
- Adjust the daily and per-run generation limits.
These changes enhance the user experience by providing more
up-to-date and visually appealing content, while also controlling
the resource usage during image generation.
- Comment out featured arts in home controller
- Update index.html.erb to display latest arts instead of featured
This change aims to keep the displayed arts up-to-date and fresh by showing the latest ones, enhancing user experience by providing more current content.
The code refactoring is done by commenting out the random art functionality from the index page and removing the corresponding code from the home_controller. This eliminates the need for a random art display, simplifying the application's behavior.
This also fixes a bug where it was showing random arts and makes it so the application runs more efficiently since it's not calling the unnecessary code anymore.
- Implement MapController for displaying city maps
- Add map rendering in the city show view
- Include weather arts in the city show controller
- Update asset pipeline to include Leaflet CSS and JS
This commit introduces a map feature that allows users to view
geographical information related to cities. The map is integrated
with weather arts data, enhancing the overall functionality of
the city show page.
- Changed includes for WeatherArt to optimize query
- Removed redundant includes of country in WeatherArt
- Simplified region fetching by directly ordering
These modifications improve the efficiency of the queries
by reducing unnecessary joins and utilizing ActiveRecord’s
query capabilities more effectively. The code change does not
affect the overall functionality but improves maintainability.
- Include associated city and image attachment in popular,
random, latest, and featured arts queries to enhance data
accessibility and performance.
- This modification reduces N+1 query issues by eager-loading
associations, leading to improved query performance when
accessing related data.
- Introduced PageLoadTimeController to measure and display
page load times.
- Moved the footer content into a partial for better code
organization.
- Added 'bullet' gem for performance monitoring.
This commit enhances the application by providing useful
information about load time directly in the UI and
refactoring the layout code for maintainability.
- Update to include a new 'random' scope in WeatherArt model.
- Modify HomeController to fetch random and popular arts along with latest arts.
- Refactor index.html.erb to utilize a partial for rendering arts.
This update improves the display of weather art by adding a new
random selection of arts alongside popular ones, increasing user
engagement and variety. The code structure is also cleaner due
to the use of a partial view for rendering arts, promoting
the DRY principle.
- Change `by_popularity` method in `City` model to use `start_time` for filtering views.
- Update `by_popularity` in `WeatherArt` model to limit results and incorporate the correct popularity calculation.
- Adjust `HomeController` to define `@popular_shuffle_arts` and `@latest_arts` with appropriate scopes.
These changes improve the accuracy of popularity retrieval for both cities and weather arts, simplifying the logic in the controller and leveraging updated model methods for performance.
- Introduce filtering of cities by selected country
- Retrieve current country using friendly find method
- Apply city filtering if country is provided in parameters
This change allows users to efficiently filter cities based on the
selected country, providing a more tailored experience and
encouraging better navigation through the list of cities.
- Implement loading state in the search input with spinner.
- Optimize the search request to handle pending requests and cancels.
- Add dynamic response handling for Turbo frames to load search results.
- Create a new partial for city search results.
- Update the cities controller to support Turbo stream responses.
These enhancements improve user experience during searches by showing a loading
spinner and addressing potential issues with overlapping requests, ensuring
that the application remains responsive and functional when fetching city
search results.
- Implement search_by_name scope in City model
- Add SearchController for handling search input
- Include _search_city partial in cities index view
- Update cities_controller to filter cities based on search query
This commit introduces a new feature that allows users to search for
cities by name using an input field. The search is implemented as a
scope in the City model, and it is integrated into the existing
CitiesController. A dedicated SearchController manages the input
submission with a debouncing mechanism for better performance. The
search field is rendered in the cities index view, enhancing user
interactivity and experience.
- Clean up trailing whitespace in app/admin/state.rb
- Clean up trailing whitespace in app/admin/subregions.rb
- Clean up trailing whitespace in app/admin/users.rb
- Adjust formatting in cities_controller.rb for consistency
These changes improve code readability and maintainability by
removing unnecessary whitespace. It is a small clean-up that prepares
files for better version control parsing and reduces the diff clutter.
- Update menu labels for cities, countries, and regions
- Introduce new entities for states and subregions in Admin Panel
- Implement admin authentication for weather art generation
- Modify application controller to check for admin user
- Refactor view to display admin panel based on user permissions
- Update routes to include weather art generation action
These changes enhance the admin interface for better management of cities
and related entities. The new admin checks ensure that only authorized users
can generate weather art, improving security and functionality.
- Change ordering of previous weather art to use 'id' descending
- Change ordering of next weather art to use 'id' ascending
- Remove unnecessary blank line in seeds file
These changes enhance the consistency of the weather art
navigation by using 'id' for ordering, ensuring the
correct retrieval of records.
- Implement previous and next weather art navigation
- Update weather arts controller to fetch adjacent weather arts
- Modify show view to include navigation links
This update enhances the user experience by allowing users to
navigate through weather arts seamlessly. The previous and
next buttons improve accessibility, providing a smoother
browsing experience. The implementation also accounts for
situations where no adjacent weather arts exist, ensuring
clarity for users.