-
Notifications
You must be signed in to change notification settings - Fork 1
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: get hidden nodes via query parameter now compresses #329
Conversation
if (nodesInitialized) { | ||
handleLayout(fitViewOptions, hiddenNodeIds) | ||
} | ||
initialize() |
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.
📝 Since async/await is now required, I just wrapped it in a function named initialize.
const tableNameFromUrl = getActiveTableNameFromUrl() | ||
updateActiveTableName(tableNameFromUrl) | ||
const hiddenNodeIds = await getHiddenNodeIdsFromUrl() | ||
addHiddenNodeIds(hiddenNodeIds) |
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.
While the active
parameter remains in plain text, I noticed that the hidden
parameter is serialized in base64. As we anticipate an increase in the variety of parameters in the future, it might be worth considering serializing everything in base64, including the keys. However, for the time being, the current specification seems reasonable!
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.
LGTM!
CompressionStream
API is used to compress the file into a url safe format.before
https://liam-erd-sample.vercel.app/?hidden=account_aliases%2Caccount_conversations%2Caccount_deletion_requests%2Caccount_domain_blocks%2Caccount_migrations%2Caccount_moderation_notes%2Caccount_notes%2Caccount_pins%2Caccount_relationship_severance_events%2Caccount_stats%2Caccount_statuses_cleanup_policies%2Caccount_warning_presets%2Caccount_warnings%2Caccounts%2Caccounts_tags%2Cadmin_action_logs%2Cannouncement_mutes%2Cannouncement_reactions%2Cannouncements%2Cannual_report_statuses_per_account_counts%2Cappeals%2Cbackups%2Cblocks%2Cbookmarks%2Cbulk_import_rows%2Cbulk_imports%2Ccanonical_email_blocks%2Cconversation_mutes%2Cconversations%2Ccustom_emoji_categories%2Ccustom_emojis%2Ccustom_filter_keywords%2Ccustom_filter_statuses%2Ccustom_filters%2Cdomain_allows%2Cdomain_blocks%2Cemail_domain_blocks%2Cfavourites%2Cfeatured_tags%2Cfollow_recommendation_mutes%2Cfollow_recommendation_suppressions%2Cfollow_requests%2Cfollows%2Cgenerated_annual_reports%2Cidentities%2Cimports%2Cinvites%2Cip_blocks%2Clist_accounts%2Clists%2Clogin_activities%2Cmarkers%2Cmedia_attachments%2Cmentions%2Cmutes%2Cnotification_permissions%2Cnotification_policies%2Cnotification_requests%2Cnotifications%2Coauth_access_grants%2Coauth_access_tokens%2Coauth_applications%2Cpghero_space_stats%2Cpoll_votes%2Cpolls%2Cpreview_card_providers%2Cpreview_card_trends%2Cpreview_cards%2Cpreview_cards_statuses%2Crelationship_severance_events%2Crelays%2Creport_notes%2Creports%2Crules%2Cscheduled_statuses%2Csession_activations%2Csettings%2Csevered_relationships%2Csite_uploads%2Csoftware_updates%2Cstatus_edits%2Cstatus_pins%2Cstatus_stats%2Cstatus_trends%2Cstatuses%2Cstatuses_tags%2Ctag_follows%2Ctag_trends%2Ctags%2Cterms_of_services%2Ctombstones%2Cunavailable_domains%2Cuser_invite_requests%2Cweb_push_subscriptions%2Cweb_settings%2Cwebauthn_credentials%2Cwebhooks
after
https://liam-erd-sample-e5rv25d9p-route-06-core.vercel.app/?active=user_roles&hidden=eJx9VGvS2yAMvBB30sigOGoAUQns-W7fwfiZdvonQQsWu9Ii9F5aroCR0cgc7rGXvJAaVpZ8oYEidQSUfjeyetuRhJxhiuI_F5p41q8USQINDLLU243PqPDtG6U4sry5gNFCitkT0EL5RsEqfkXNyMBHwtwKFIns-XbFipo5z1CUjOpf-AlcC6jY4ZA4A_pNQ5SO5Cwte0rUBbZNxx1SGqef8BY1jKBURG-MCylcfRgMSiGM5ib0n1bM7XWeRD4Jta9a_ACnLZHK-gDMecyS2WMESsjxaNO9yTvvZ999syoJKMkvBo-VZtFewjt-Ri-OlRQ-9LOKhm_4UPeEze3GwRg766eNBtkn9sJFmnLn-iKsTSmMtrykpwAlLylRDndV_96zVnrvbZN6HtmNPWJzM-XuVwrw6JY5DpQr116Oo8ycl40Yl4NtZKtw-qhH5qLMu3-W8XnvYC9FosAIWCv69zBI_93YDRlZKr_YD_aFNPFO_rlxGP2BnsLuqDnBVt-dIZnBrNhvfWBVPnSdKyWen5b5TSpgBT3tj69IjLBsD7kvzRWlhWkFjxqgqCwcutIHXJVyeGJf0WWe_0-CvvvT_7ZnMAbK0S5tkcyZf1NokcKV0oYDRkN2aUa1biNgu4LCYwKZM64ErUTBYM7kVVfUDgTsN47MQIHrGWzjbF-PUu3BLv5icwyBzdMVZziM2Nf76bFHmgzkBUa6sCdzVdJkVTKZaxkX5IhTpP39mGtGCsOilxtWmqA0e4O1ybxyGQXo8FmElabe_QxeaTN9n0QrTW-Rj_0BZGKJHg