-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix: compile-time configurable NY-delimiter #266
base: main
Are you sure you want to change the base?
Conversation
367a9d1
to
46e8ae3
Compare
Lets not label anything with |
where | ||
NF: Fn(Option<String>) + 'static + Clone, | ||
{ | ||
#[prop(into)] on_folder_click: Callback<Option<String>, ()>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the advantage of Callback over the generic function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saves us from writing clone()
everywhere, handled internally by Leptos when we actually use the value.
Callback internally uses StoredValue
which is just an id to memory arena (something similar) in leptos. Makes it easy to use in move
closures.
|
||
#[cfg(feature = "ny-delimiter")] | ||
const GROUPING_DELIMITER: &[char] = &['.', ':']; | ||
|
||
#[cfg(not(feature = "ny-delimiter"))] | ||
const GROUPING_DELIMITER: &[char] = &['.']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const GROUPING_DELIMITER: &[char] = if cfg!(feature = "ny-delimiter") { &['.', ':'] } else { &['.'] };
Something like this can be done?
And agreed with @ayushjain17 , lets not label it with NY or anything specific.
1ed5722
to
fd251d9
Compare
@@ -234,7 +246,7 @@ impl Display for RegexEnum { | |||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | |||
let regex = match self { | |||
Self::DefaultConfigKey => ALPHANUMERIC_WITH_DOT, | |||
Self::DimensionName => ALPHANUMERIC_WITH_DOT, | |||
Self::DimensionName => ALPHANUMERIC_WITHOUT_DOT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we changing this ?
we do intend to allow dimension names like {key1}.{key2}
Write a proper PR description |
fd251d9
to
3e3825a
Compare
we would need changes in Makefile as well, right ? |
Problem
Describe the problem you are trying to solve here
Solution
Provide a brief summary of your solution so that reviewers can understand your code
Environment variable changes
What ENVs need to be added or changed
Pre-deployment activity
Things needed to be done before deploying this change (if any)
Post-deployment activity
Things needed to be done after deploying this change (if any)
API changes
Possible Issues in the future
Describe any possible issues that could occur because of this change