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

feat: generating a unique id for config #41

Merged
merged 2 commits into from
Feb 9, 2023
Merged

Conversation

jhoncool
Copy link
Collaborator

@jhoncool jhoncool commented Feb 9, 2023

DashKit.setItem generates a unique id for the entire config ids.

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@jhoncool jhoncool assigned Marginy605 and jhoncool and unassigned Marginy605 Feb 9, 2023
@jhoncool jhoncool requested a review from Marginy605 February 9, 2023 14:27
ids?: string[];
};

export function getNewId({config, salt, counter, ids = []}: GetNewIdArgs) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add comment for args (or better in type GetNewIdArgs). It's not obvious that ids is used for kind of excluding (https://github.com/gravity-ui/dashkit/pull/41/files#diff-aab83ab4ef47bc5f82ffdc6f9b5c7bdea61325dba8344ea740b4aa01a2d28d3fR221) that provides uniqueness.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

maybe it's better rename to excludeIds

@jhoncool jhoncool added this pull request to the merge queue Feb 9, 2023
Merged via the queue into main with commit 062c8d0 Feb 9, 2023
@jhoncool jhoncool deleted the generate_uniq_ids branch February 9, 2023 15:36
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.

3 participants