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

Fix: disable toggle for share link creation without archive version, fix auto-copy in Safari #4885

Merged
merged 3 commits into from Dec 7, 2023

Conversation

shamoon
Copy link
Member

@shamoon shamoon commented Dec 7, 2023

Proposed change

Couple things bundled into one here (just because thats how the issue was opened):

  • Only show the archive toggle (and set it to false) if archive exists
  • Safari doesnt like auto-copying a newly-created link before change detection has run, so we add a 10ms delay before copying. The other piece I added, just in case, is if the copy operation fails, dont show the 'Copied!' badge.

Video below illustrates the process in Safari 17.1 on macOS 14.1.1:

4882.mov

And for completion, the disabled toggle on a document without archive:
Screenshot 2023-12-07 at 12 07 01 PM

Fixes #4882

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain):

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have included testing coverage for new code in this PR, for backend and / or front-end changes.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@shamoon shamoon added this to the Next Release milestone Dec 7, 2023
@shamoon shamoon requested a review from a team as a code owner December 7, 2023 20:10
@github-actions github-actions bot added the bug Bug report or a Bug-fix label Dec 7, 2023
@paperless-ngx-secretary paperless-ngx-secretary bot added frontend non-trivial Requires approval by several team members labels Dec 7, 2023
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5cd17e7) 96.11% compared to head (e606550) 97.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #4885      +/-   ##
==========================================
+ Coverage   96.11%   97.68%   +1.57%     
==========================================
  Files         379      208     -171     
  Lines       14514     6783    -7731     
  Branches     1140     1141       +1     
==========================================
- Hits        13950     6626    -7324     
+ Misses        560      153     -407     
  Partials        4        4              
Flag Coverage Δ
backend ?
frontend 97.68% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shamoon shamoon enabled auto-merge (squash) December 7, 2023 21:18
@shamoon shamoon changed the title Fix: share link creation without archive version, auto-copy in Safari Fix: disable toggle for share link creation without archive version, fix auto-copy in Safari Dec 7, 2023
Copy link
Member

@stumpylog stumpylog left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks

@shamoon shamoon merged commit 5942cd6 into dev Dec 7, 2023
31 checks passed
@shamoon shamoon deleted the fix/issue-4882 branch December 7, 2023 21:48
Copy link
Contributor

github-actions bot commented Jan 7, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug report or a Bug-fix frontend non-trivial Requires approval by several team members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Cannot share link to document
2 participants