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

Share personal cleanup + note #29935

Merged
merged 1 commit into from
Feb 9, 2018
Merged

Share personal cleanup + note #29935

merged 1 commit into from
Feb 9, 2018

Conversation

felixheidecke
Copy link
Contributor

Description

  • Reduce length of date field for external link
  • Change button text 'Save' to 'Share'
  • Change mail error text
  • Add send confirmation after sending notification
  • Add message field for email

Related Issue

Replaces (because contains): #29721
Fixes: #29694

How Has This Been Tested?

Visual tests in latest Chrome & Firefox

Screenshots (if appropriate):

Types of changes

  • 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 change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests pass.

@felixheidecke felixheidecke added 2 - Developing feature:sharing p1-urgent Critical issue, need to consider hotfix with just that issue labels Dec 20, 2017
@felixheidecke felixheidecke added this to the development milestone Dec 20, 2017
@felixheidecke felixheidecke changed the title Share personal note Share personal cleanup + note Dec 20, 2017
@PVince81
Copy link
Contributor

Code looks good so far.

We talked about injecting the default template in there. I'll try exposing this somehow from the backend.

@PVince81
Copy link
Contributor

PVince81 commented Dec 20, 2017

@PVince81
Copy link
Contributor

pushed: server now uses the specified message. If empty, it falls back to the default template.

Note that when specified it's a plain text email and it strips away the tags with strip_tags.

Next up: find a way to pass original template back for use in the dialog, in a way that clients could also reuse...

@PVince81
Copy link
Contributor

It looks like this would need a new API endpoint. Considering that we want clients to be able to use this email feature too, we'd likely need to add a new public endpoint, maybe an extension of the existing OCS Share API.

And if we need to do this, we might as well move the current emailing code (the sending part) to said endpoint as well. So the endpoint would have two functions:

  1. get email template for given values (expiration, filename, etc)
    and
  2. send email with given body

@PVince81
Copy link
Contributor

I suggest merging this PR as is, maybe tweak the current message and work on the email endpoint separately, as I have the feeling this will take longer due to API design decisions needing to be made.

@pmaier1 thoughts ?

@PVince81
Copy link
Contributor

Raised #29937 for exposing template.

@PVince81
Copy link
Contributor

  • add CC option

@felixheidecke can you add ? I can adjust the backend then

@PVince81 PVince81 mentioned this pull request Dec 20, 2017
@pmaier1
Copy link
Contributor

pmaier1 commented Dec 21, 2017

I suggest merging this PR as is, maybe tweak the current message and work on the email endpoint separately, as I have the feeling this will take longer due to API design decisions needing to be made.
@pmaier1 thoughts ?

Yes, when the stuff in here #29694 is covered and this is tested we should merge. I would be also very happy if you could provide a patch for this PR then.

@PVince81 PVince81 modified the milestones: development, planned Jan 12, 2018
@codecov
Copy link

codecov bot commented Jan 15, 2018

Codecov Report

Merging #29935 into master will decrease coverage by 0.01%.
The diff coverage is 34.69%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #29935      +/-   ##
============================================
- Coverage     60.87%   60.85%   -0.02%     
- Complexity    18568    18577       +9     
============================================
  Files          1093     1093              
  Lines         61325    61361      +36     
============================================
+ Hits          37333    37343      +10     
- Misses        23992    24018      +26
Impacted Files Coverage Δ Complexity Δ
core/js/config.php 0% <0%> (ø) 0 <0> (ø) ⬇️
core/ajax/share.php 0% <0%> (ø) 0 <0> (ø) ⬇️
lib/private/Share/MailNotifications.php 89.69% <89.47%> (-0.9%) 24 <14> (+9)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c86e515...1916d25. Read the comment docs.

@PVince81
Copy link
Contributor

PVince81 commented Jan 16, 2018

Fixes #29696

  • Felix: CC must be a checkbox only that appearrs only if OC.getCurrentUser().email is set
  • Vincent: export email address through OC.getCurrentUser()

@PVince81
Copy link
Contributor

  • backend must actually set CC to current user's email address

@PVince81
Copy link
Contributor

bcc to self or cc ? @pmaier1

bcc might be a better idea here

@DeepDiver1975
Copy link
Member

rebase needed because of conflicts .....

$emailBody = trim((string)$_POST['emailBody']);
}

$l10n = \OC::$server->getL10N('lib');
Copy link
Member

Choose a reason for hiding this comment

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

why lib? this file lives in core - did this ever work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PVince81 yours?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this never worked... I just moved up the getL10N call from below.

Considering that emails are usually be taken from the mail template, I don't think the template is translated.

Needs separate testing.

@@ -24,7 +33,7 @@
clear: both;
}

.hidden {
.hidden.hidden {
Copy link
Member

Choose a reason for hiding this comment

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

duplicate hidden?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. This a lesser version of the !important statement;

action : 'email',
toAddress : mail.to,
emailBody : mail.body,
bccSelf : mail.bccSelf,
Copy link
Member

Choose a reason for hiding this comment

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

indent

@felixheidecke
Copy link
Contributor Author

@PVince81 pls help with conflicts in share.php

@IljaN
Copy link
Member

IljaN commented Feb 7, 2018

Rebase error?

@felixheidecke felixheidecke force-pushed the share-personal-note branch 2 times, most recently from d32ecfd to c44a0e2 Compare February 7, 2018 16:20
@IljaN IljaN assigned felixheidecke and unassigned IljaN and felixheidecke Feb 7, 2018
@felixheidecke
Copy link
Contributor Author

felixheidecke commented Feb 7, 2018

Rebase error?

Never 😇 … 👅

Reduce length of date field for external link
Change button text 'Save' to 'Share'
Change mail error text
Add send confirmation after sending notification
defer link creation upon failing email notification
Modify UI tests for Public Link dialog Share button
Show button text "share" if creating a new share
Add message field to share modal
Send custom link share mail notification when specified
Add email to OC.getCurrentUser()
Add bccToSelf checkbox for linkshare
Add bcc to self for public link share
Add method description
Spaces to tabs
Rework confusing shorthand code
Correctly check bcc post
Move email attribute to oc_user attribute
Disable autocomplete on email input
Bring back OC.currentUser for legacy code...
Fix faulty autocomplete
Make dialog css more readable
Propperly test $options in MailNotification
Fix currentUser related tests
Fix the fix
Add new tests for bcc functionality, remove legacy autocomplete test
@PVince81
Copy link
Contributor

PVince81 commented Feb 8, 2018

@felixheidecke did it work our with the JS test ?

@felixheidecke
Copy link
Contributor Author

did it work out with the JS test?

Sure did. The test had to fail since it tested a feature that was scaped. I should have guessed that :-P

@PVince81 PVince81 merged commit 144b5b1 into master Feb 9, 2018
@PVince81 PVince81 deleted the share-personal-note branch February 9, 2018 15:51
@PVince81
Copy link
Contributor

PVince81 commented Feb 9, 2018

@felixheidecke please backport to stable10

@PVince81
Copy link
Contributor

regression: #30557

@PVince81
Copy link
Contributor

stable10: #30486

@SergioBertolinSG
Copy link
Contributor

When sending an email it should fail when it is unable to send the email, specially if the email address is not complete:

email_verification

@SergioBertolinSG
Copy link
Contributor

#29935 (comment) is fixed in 10.0.8RC2.

@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public link share UI cleanup
7 participants