Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add range_select function to simple expr #628

Closed
wants to merge 3 commits into from

Conversation

ModProg
Copy link
Contributor

@ModProg ModProg commented Nov 26, 2022

Fixes #622

Please follow this template, if applicable.

Description

Adds range_select function. PoC.

Usage

When adding a widget or anything else that affects the configuration,
please provide a minimal example configuration snippet showcasing how to use it and

Showcase

When adding widgets, please provide screenshots showcasing how your widget looks.
This is not strictly required, but strongly appreciated.

Additional Notes

Anything else you want to add, such as remaining questions or explanations.

Checklist

Please make sure you can check all the boxes that apply to this PR.

  • All widgets I've added are correctly documented.
  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing

@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2022-08-27"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the nightly bump?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to use the now stable let ... else I think. Not really necessary, though.

@@ -341,13 +346,39 @@ fn call_expr_function(name: &str, args: Vec<DynVal>) -> Result<DynVal, EvalError
[json] => Ok(DynVal::from(json.as_json_object()?.len() as i32)),
_ => Err(EvalError::WrongArgCount(name.to_string())),
},
"range_select" => match args.as_slice() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. Wanted to finalize the design a little in #622

Copy link
Contributor

@w-lfchen w-lfchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be closed since #622 is fixed?

@ModProg
Copy link
Contributor Author

ModProg commented Aug 27, 2024

probably, I don't really use eww much so I havn't looked at this in a while. I can always reopen should I feel like there is still something missing in the future.

@ModProg ModProg closed this Aug 27, 2024
@w-lfchen
Copy link
Contributor

sure thing!
i've adopted your other pr (#629) and finished it in #1176 since there wasn't any activity on there as well
(you're attributed as the author ^^)

@ModProg
Copy link
Contributor Author

ModProg commented Aug 27, 2024

sure thing! i've adopted your other pr (#629) and finished it in #1176 since there wasn't any activity on there as well (you're attributed as the author ^^)

Thanks, I am using that branch locally already, but I must have forgotten to actually finish it up, I think mainly docs were missing IIRC.

@w-lfchen
Copy link
Contributor

w-lfchen commented Aug 28, 2024

docs were missing and there was a discussion that had been resolved (handling of empty json strings), but there were no consequences after that; see my pr for details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] range_select function
3 participants