v0.3.0

glanceapp/glancev0.3.0May 3, 2024by svilenmarkov

AI Summary

This release enhances customization and accessibility, adding thumbnail support for Reddit, custom comment URLs for alternative front-ends, and better control over bookmark links and icons.

Key Highlights

  • Added support for custom comment URLs for Reddit, Hacker News, and Videos (enabling alternative front-ends).
  • Enabled thumbnails for Reddit posts via the show-thumbnails property.
  • Added custom icons and Simple Icons support for bookmark links.
  • Improved Weather widget location specification by adding state support.
  • Added same-tab and hide-arrow properties for bookmarks and monitor widgets.

Breaking Changes

  • The default sort order for the Stocks widget changed from absolute change to definition order.

New Features

  • Custom comments URL templates.
  • Proxy URL templates for Reddit.
  • Reddit thumbnails.
  • State support in Weather location.
  • Same-tab property.
  • Hide-arrow property.
  • Custom icons for bookmarks.

Full Release Notes

## New 

### Custom URLs

The `reddit`, `hacker-news` and `videos` widgets can now have custom URLs for the comments if you prefer using, or host alternative front-ends. Example:

```yaml
- type: hacker-news
  comments-url-template: https://www.hckrnws.com/stories/{POST-ID}
```

```yaml
- type: reddit
  comments-url-template: https://old.reddit.com/{POST-PATH}
```

```yaml
- type: videos
  video-url-template: https://invidious.your-domain.com/watch?v={VIDEO-ID}
```
(thanks for the idea @AlissonSantos95)

In addition, if you're hosting Glance on a VPS you may have noticed that the Reddit widget doesn't work due to Reddit blocking VPS IPs. As a workaround, you can now set a custom URL for the requests, routing them through an HTTP proxy. Example:

```yaml
- type: reddit
  request-url-template: https://your-proxy.com/{REQUEST-URL}
```

(thanks for contributing @jarylc and for reporting the issue @Iliannnn & @imjuzcy)

### Thumbnails for Reddit posts

You can now show thumbnails for Reddit posts (for the default style) using the new `show-thumbnails` property: 

```yaml
- type: reddit
  subreddit: technology
  show-thumbnails: true
```

Preview:

![reddit-widget-vertical-list-thumbnails](https://github.com/glanceapp/glance/assets/7613769/c85b818f-11b9-416c-974e-94ffa1dc3184)

> [!NOTE]
>
> Thumbnails are disabled by some subreddits and aren't available for others due to limitations in Reddit's API but _should_ work in most cases.

### More control over the Weather widget location

Previously, you could only specify the city name and country for the location, however that made it impossible to set your location if the name of your city was used across multiple US states. You can now optionally select the state as the middle value:

```yaml
location: Greenville, North Carolina, United States
# or 
location: Greenville, South Carolina, United States
# or
location: Greenville, Mississippi, United States
```

(thanks for reporting @mikesellt)

Additionally, you can now choose to show the state in the location using the new `show-area-name` property.

### Opening links in the same tab

The bookmarks as well as monitor widgets now have a `same-tab` property for each entry which allows you to specify whether to open the link in the same or a new tab. Example:

```yaml
- type: bookmarks
  groups:
    - title: Entertainment
      links:
        - title: YouTube
          url: https://www.youtube.com/
          same-tab: true
```

```yaml
- type: monitor
  sites:
    - title: Jellyfin
      url: https://your-domain.com/
      same-tab: true
```

(thanks for the idea @Rinnray)

### Hiding the arrow of bookmark links

You can now hide the arrow for each link in the bookmarks widget using the new `hide-arrow` property:

```yaml
- type: bookmarks
  groups:
    - title: Entertainment
      links:
        - title: YouTube
          url: https://www.youtube.com/
          hide-arrow: true
```

Preview: 

![image](https://github.com/glanceapp/glance/assets/7613769/54a1db6e-07c1-408b-9147-08ca621212f2)

### Icons for bookmark links

You can now add icons to bookmark links using the new `icon` property on each link:

```yaml
- type: bookmarks
  groups:
    - title: General
      links:
        - title: Gmail
          url: https://mail.google.com/mail/u/0/
          icon: /assets/path/to/icon.png
```

Preview, combined with `hide-arrow: true`:

![image](https://github.com/glanceapp/glance/assets/7613769/561cfa20-4868-4e4e-86b1-950b26936d47)

(thanks for the idea @Rinnray)

Additionally, you can now directly use [Simple Icons](https://simpleicons.org/) for each bookmark icon using the `si:` prefix:

```yaml
icon: si:gmail
icon: si:youtube
icon: si:reddit
```

> [!WARNING]
>
> Simple Icons are loaded externally and are hosted on `cdnjs.cloudflare.com`, if you do not wish to depend on a 3rd party you are free to download the icons individually and host them locally.

## Changed

### Stocks widget sort order

Previously, the stocks widget would order the stocks based on their price change for the day, placing the ones with the highest % change at the top. As this was somewhat unexpected and potentially confusing, it will now display stocks in the order which they were defined by default. To go back to the old behavior, use the `sort-by` property:

```yaml
- type: stocks
  sort-by: absolute-change
```

(thanks for reporting @allardhs)

## Fixed

* The stocks widget now displays the proper currency symbol for prices (thanks for reporting @Iliannnn)