themarshallproject / klaxon

Klaxon enables reporters and editors to monitor scores of sites on the web for newsworthy changes.
https://newsklaxon.org
MIT License
644 stars 200 forks source link

Feature request: require CSS selector #690

Open Kat-Alo opened 1 year ago

Kat-Alo commented 1 year ago

It seems that leaving the Selector field blank renders a watched page un-watchable (Please correct me if this is wrong.). We've tried communicating with our users that they must populate that field with a selector, but it would be a nice lil feature to force that field to be populated in order to save the page; especially because failure to detect changes happens quietly (that is, users will likely just be unaware that their watched page isn't working the way they thought it would).

Relatedly, I think the site URL is also an optional field. While it's more obvious that the page watch should fail, I think it might be nice to have it be a required field as well.

rdmurphy commented 1 year ago

Huh — that is baffling. I'm trying really hard to think of a reason why either of those fields are not currently required and were not in the first place. 😅 I guess I could see a scenario where no css_selector means "watch this entire page" but as you noted we aren't actually doing that currently so it'd be hard to argue that's currently the expectation. Same with url too.