{ "issue": { "url": "https://api.github.com/repos/laurent22/joplin/issues/10076", "repository_url": "https://api.github.com/repos/laurent22/joplin", "labels_url": "https://api.github.com/repos/laurent22/joplin/issues/10076/labels{/name}", "comments_url": "https://api.github.com/repos/laurent22/joplin/issues/10076/comments", "events_url": "https://api.github.com/repos/laurent22/joplin/issues/10076/events", "html_url": "https://github.com/laurent22/joplin/pull/10076", "id": 2173103915, "node_id": "PR_kwDOBLftOs5o7OEm", "number": 10076, "title": "Desktop: Fixes #10060: Fix \"New note\" button rendering when startup with Trash can selected.", "user": { "login": "khuongduy354", "id": 42113313, "node_id": "MDQ6VXNlcjQyMTEzMzEz", "avatar_url": "https://avatars.githubusercontent.com/u/42113313?v=4", "gravatar_id": "", "url": "https://api.github.com/users/khuongduy354", "html_url": "https://github.com/khuongduy354", "followers_url": "https://api.github.com/users/khuongduy354/followers", "following_url": "https://api.github.com/users/khuongduy354/following{/other_user}", "gists_url": "https://api.github.com/users/khuongduy354/gists{/gist_id}", "starred_url": "https://api.github.com/users/khuongduy354/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/khuongduy354/subscriptions", "organizations_url": "https://api.github.com/users/khuongduy354/orgs", "repos_url": "https://api.github.com/users/khuongduy354/repos", "events_url": "https://api.github.com/users/khuongduy354/events{/privacy}", "received_events_url": "https://api.github.com/users/khuongduy354/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "labels": [], "state": "closed", "locked": false, "assignee": null, "assignees": [], "milestone": null, "comments": 4, "created_at": "2024-03-07T06:57:57Z", "updated_at": "2024-03-15T09:29:35Z", "closed_at": "2024-03-15T09:29:24Z", "author_association": "CONTRIBUTOR", "sub_issues_summary": { "total": 0, "completed": 0, "percent_completed": 0 }, "active_lock_reason": null, "draft": false, "pull_request": { "url": "https://api.github.com/repos/laurent22/joplin/pulls/10076", "html_url": "https://github.com/laurent22/joplin/pull/10076", "diff_url": "https://github.com/laurent22/joplin/pull/10076.diff", "patch_url": "https://github.com/laurent22/joplin/pull/10076.patch", "merged_at": "2024-03-15T09:29:24Z" }, "body": "# Summary\r\nPreviously, New note button ref is stored by useRef, which doesn't trigger rerender when ref change. This cause if the Trash can is selected in previous session, when reopen the app, the ref to New note is null by default, preventing the New note button to re-render into correct format.\r\nMore details and how to reproduce bugs: #10060.\r\n\r\n# Solution notes \r\n- Changed useRef to useState instead for storing New note button element. \r\n- I think panel width unchanged should not prevent re-render. There might be cases where element change needs re-render but panel width doesn't change (toggle button visibility for example).\r\nSo i remove this line \r\n![image](https://github.com/laurent22/joplin/assets/42113313/1c033d27-3424-4561-9dd2-60ec89cee782)\r\n\r\n \r\n\r\n\r\n# Testing\r\n1. Open Joplin, create an empty notebook in root \r\n2. Click on Trash can (make sure the New note button is hidden, Trash can is collapsed)\r\n3. Shrink the panel with search bar as small as possible.\r\n4. Close & reopen Joplin\r\n5. Click on the notebook in step 1, New note button should appear in correct format for small screen (which is an icon).", "closed_by": { "login": "laurent22", "id": 1285584, "node_id": "MDQ6VXNlcjEyODU1ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laurent22", "html_url": "https://github.com/laurent22", "followers_url": "https://api.github.com/users/laurent22/followers", "following_url": "https://api.github.com/users/laurent22/following{/other_user}", "gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}", "starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laurent22/subscriptions", "organizations_url": "https://api.github.com/users/laurent22/orgs", "repos_url": "https://api.github.com/users/laurent22/repos", "events_url": "https://api.github.com/users/laurent22/events{/privacy}", "received_events_url": "https://api.github.com/users/laurent22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/10076/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "timeline_url": "https://api.github.com/repos/laurent22/joplin/issues/10076/timeline", "performed_via_github_app": null, "state_reason": null }, "comments": [ { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1982632419", "html_url": "https://github.com/laurent22/joplin/pull/10076#issuecomment-1982632419", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/10076", "id": 1982632419, "node_id": "IC_kwDOBLftOs52LJHj", "user": { "login": "github-actions[bot]", "id": 41898282, "node_id": "MDM6Qm90NDE4OTgyODI=", "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github-actions%5Bbot%5D", "html_url": "https://github.com/apps/github-actions", "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", "type": "Bot", "user_view_type": "public", "site_admin": false }, "created_at": "2024-03-07T06:58:09Z", "updated_at": "2024-03-15T09:29:35Z", "author_association": "CONTRIBUTOR", "body": "****CLA Assistant Lite bot**** All contributors have signed the CLA ✍️ ✅", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1982632419/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": { "id": 15368, "client_id": "Iv1.05c79e9ad1f6bdfa", "slug": "github-actions", "node_id": "MDM6QXBwMTUzNjg=", "owner": { "login": "github", "id": 9919, "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4", "gravatar_id": "", "url": "https://api.github.com/users/github", "html_url": "https://github.com/github", "followers_url": "https://api.github.com/users/github/followers", "following_url": "https://api.github.com/users/github/following{/other_user}", "gists_url": "https://api.github.com/users/github/gists{/gist_id}", "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/github/subscriptions", "organizations_url": "https://api.github.com/users/github/orgs", "repos_url": "https://api.github.com/users/github/repos", "events_url": "https://api.github.com/users/github/events{/privacy}", "received_events_url": "https://api.github.com/users/github/received_events", "type": "Organization", "user_view_type": "public", "site_admin": false }, "name": "GitHub Actions", "description": "Automate your workflow from idea to production", "external_url": "https://help.github.com/en/actions", "html_url": "https://github.com/apps/github-actions", "created_at": "2018-07-30T09:30:17Z", "updated_at": "2025-03-07T16:35:00Z", "permissions": { "actions": "write", "administration": "read", "attestations": "write", "checks": "write", "contents": "write", "deployments": "write", "discussions": "write", "issues": "write", "merge_queues": "write", "metadata": "read", "models": "read", "packages": "write", "pages": "write", "pull_requests": "write", "repository_hooks": "write", "repository_projects": "write", "security_events": "write", "statuses": "write", "vulnerability_alerts": "read" }, "events": [ "branch_protection_rule", "check_run", "check_suite", "create", "delete", "deployment", "deployment_status", "discussion", "discussion_comment", "fork", "gollum", "issues", "issue_comment", "label", "merge_group", "milestone", "page_build", "project", "project_card", "project_column", "public", "pull_request", "pull_request_review", "pull_request_review_comment", "push", "registry_package", "release", "repository", "repository_dispatch", "status", "watch", "workflow_dispatch", "workflow_run" ] } }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1982644260", "html_url": "https://github.com/laurent22/joplin/pull/10076#issuecomment-1982644260", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/10076", "id": 1982644260, "node_id": "IC_kwDOBLftOs52LMAk", "user": { "login": "khuongduy354", "id": 42113313, "node_id": "MDQ6VXNlcjQyMTEzMzEz", "avatar_url": "https://avatars.githubusercontent.com/u/42113313?v=4", "gravatar_id": "", "url": "https://api.github.com/users/khuongduy354", "html_url": "https://github.com/khuongduy354", "followers_url": "https://api.github.com/users/khuongduy354/followers", "following_url": "https://api.github.com/users/khuongduy354/following{/other_user}", "gists_url": "https://api.github.com/users/khuongduy354/gists{/gist_id}", "starred_url": "https://api.github.com/users/khuongduy354/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/khuongduy354/subscriptions", "organizations_url": "https://api.github.com/users/khuongduy354/orgs", "repos_url": "https://api.github.com/users/khuongduy354/repos", "events_url": "https://api.github.com/users/khuongduy354/events{/privacy}", "received_events_url": "https://api.github.com/users/khuongduy354/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2024-03-07T07:01:35Z", "updated_at": "2024-03-07T07:01:35Z", "author_association": "CONTRIBUTOR", "body": "I have read the CLA Document and I hereby sign the CLA", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1982644260/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1983778520", "html_url": "https://github.com/laurent22/joplin/pull/10076#issuecomment-1983778520", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/10076", "id": 1983778520, "node_id": "IC_kwDOBLftOs52Pg7Y", "user": { "login": "khuongduy354", "id": 42113313, "node_id": "MDQ6VXNlcjQyMTEzMzEz", "avatar_url": "https://avatars.githubusercontent.com/u/42113313?v=4", "gravatar_id": "", "url": "https://api.github.com/users/khuongduy354", "html_url": "https://github.com/khuongduy354", "followers_url": "https://api.github.com/users/khuongduy354/followers", "following_url": "https://api.github.com/users/khuongduy354/following{/other_user}", "gists_url": "https://api.github.com/users/khuongduy354/gists{/gist_id}", "starred_url": "https://api.github.com/users/khuongduy354/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/khuongduy354/subscriptions", "organizations_url": "https://api.github.com/users/khuongduy354/orgs", "repos_url": "https://api.github.com/users/khuongduy354/repos", "events_url": "https://api.github.com/users/khuongduy354/events{/privacy}", "received_events_url": "https://api.github.com/users/khuongduy354/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2024-03-07T15:36:41Z", "updated_at": "2024-03-07T15:36:41Z", "author_association": "CONTRIBUTOR", "body": "I forgot to mention, I'm participating GSoC 2024. This is my introduction: https://discourse.joplinapp.org/t/introduction-duy-huynh/36448", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1983778520/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null }, { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1999260789", "html_url": "https://github.com/laurent22/joplin/pull/10076#issuecomment-1999260789", "issue_url": "https://api.github.com/repos/laurent22/joplin/issues/10076", "id": 1999260789, "node_id": "IC_kwDOBLftOs53Kkx1", "user": { "login": "laurent22", "id": 1285584, "node_id": "MDQ6VXNlcjEyODU1ODQ=", "avatar_url": "https://avatars.githubusercontent.com/u/1285584?v=4", "gravatar_id": "", "url": "https://api.github.com/users/laurent22", "html_url": "https://github.com/laurent22", "followers_url": "https://api.github.com/users/laurent22/followers", "following_url": "https://api.github.com/users/laurent22/following{/other_user}", "gists_url": "https://api.github.com/users/laurent22/gists{/gist_id}", "starred_url": "https://api.github.com/users/laurent22/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/laurent22/subscriptions", "organizations_url": "https://api.github.com/users/laurent22/orgs", "repos_url": "https://api.github.com/users/laurent22/repos", "events_url": "https://api.github.com/users/laurent22/events{/privacy}", "received_events_url": "https://api.github.com/users/laurent22/received_events", "type": "User", "user_view_type": "public", "site_admin": false }, "created_at": "2024-03-15T09:29:17Z", "updated_at": "2024-03-15T09:29:17Z", "author_association": "OWNER", "body": "Looks good now, thanks @khuongduy354 for looking into this!", "reactions": { "url": "https://api.github.com/repos/laurent22/joplin/issues/comments/1999260789/reactions", "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 }, "performed_via_github_app": null } ] }