Comments (3)
+1 to this. Love the idea. That would actually make the application more flexible on the client side.
from glance.
Hey, thanks for the idea and for supporting the project!
This would be difficult as the YAML spec doesn't have a standardized way of importing files which leaves me with figuring out a way of specifying which things should be inherited and which should get overwritten.
For example, if you had this inside your base glance.yml
:
pages:
- name: Home
columns:
- size: full
widgets:
- type: reddit
And this inside your user configuration which extends the base:
pages:
- name: Home
columns:
- size: full
widgets:
- type: reddit
sort-by: new
What should happen? Should you end up with two Reddit widgets? Should the existing one inherit the new properties? What if you want to be able to do both in different scenarios, how would you achieve that?
from glance.
Suppose we are trying to extend/overwrite the properties of a widget, we could have an extra field called overwrite
under each type
field.
In the below case of user-specific configurations file glance.yaml
, the rss widget properties' will be overwritten by the user glance.yaml
file
widgets:
- type: calendar
- type: rss
overwrite: true
limit: 10
collapse-after: 3
cache: 3h
feeds:
- url: https://ciechanow.ski/atom.xml
- url: https://www.joshwcomeau.com/rss.xml
title: Josh Comeau
- url: https://samwho.dev/rss.xml
- url: https://awesomekling.github.io/feed.xml
- url: https://ishadeed.com/feed.xml
title: Ahmad Shadeed
In the below case of user-specific configurations file glance.yaml
, the rss widget will inherit the system-wide configuration file glance.yaml
, but can extend any new properties in the user glance.yaml
file
widgets:
- type: calendar
- type: rss
overwrite: false
limit: 10
collapse-after: 3
cache: 3h
feeds:
- url: https://ciechanow.ski/atom.xml
- url: https://www.joshwcomeau.com/rss.xml
title: Josh Comeau
- url: https://samwho.dev/rss.xml
- url: https://awesomekling.github.io/feed.xml
- url: https://ishadeed.com/feed.xml
title: Ahmad Shadeed
from glance.
Related Issues (20)
- Loving your work on glance. Do you accept donations by any chance? New to GitHub so don't know where to put this so putting it here. HOT 1
- FEATURE: Add auth HOT 3
- [FEATURE REQUEST] Adding option to only show error sites in Monitor widget HOT 1
- [FEATURE] Youtube channels exclude shorts from showing HOT 9
- [Feature Request] Ability to append domain for RSS items HOT 4
- [Feature Request] Clock widget HOT 1
- [Feature Request] Change weather provider HOT 2
- [Feature Request] GameServer Info Widget HOT 2
- Weather widget stops app initialization HOT 1
- [Request] Custom iFrame Title HOT 2
- [Feature Request] List of configurable links HOT 2
- FEATURE - Add docker images new releases widget HOT 2
- Feature - Add Trending Github Repositories HOT 1
- [FEATURE] Serving behind reverse proxy HOT 1
- [Bug] Piped feed don't show thumbnails HOT 3
- [Request] Swipe function on the smartphone HOT 1
- [FR] Feed for *arr releases HOT 2
- [REQUEST] bilibili channel HOT 3
- Can't start in Win HOT 3
- [REQUEST] proxy server configurability HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glance.