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

Support for print stylesheets #16857

Merged
1 commit merged into from
Mar 31, 2016
Merged

Support for print stylesheets #16857

1 commit merged into from
Mar 31, 2016

Conversation

Henni
Copy link
Contributor

@Henni Henni commented Jun 10, 2015

I removed the restriction media="screen" for all stylesheets and added the restriction media="print" to all stylesheets with the name print.css.

Maybe the restriction media="screen" could be added to all stylesheets with the name screen.css and similar for projection.css

This prepares the core for owncloud/tasks#119 and owncloud/mail#717.

Feedback is especially welcome for environments with the AssetPipeline enabled.

@scrutinizer-notifier
Copy link

A new inspection was created.

@@ -155,7 +155,11 @@ public function __construct( $renderAs, $appId = '' ) {
$web = $info[1];
$file = $info[2];

$this->append( 'cssfiles', $web.'/'.$file . '?v=' . self::$versionHash);
if (substr($file, -strlen('print.css')) === 'print.css') {
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be documented in the app developer documentation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll add this to the css documentation as soon as this is merged.

@nickvergessen
Copy link
Contributor

Looks good to me

@DeepDiver1975 DeepDiver1975 added this to the 8.1-current milestone Jun 11, 2015
@PVince81
Copy link
Contributor

@DeepDiver1975 feature freeze ?

@DeepDiver1975
Copy link
Member

@DeepDiver1975 feature freeze ?

you are for sure right - thx for the hint

@DeepDiver1975 DeepDiver1975 modified the milestones: 8.2-next, 8.1-current Jun 11, 2015
@PVince81
Copy link
Contributor

PVince81 commented Jul 6, 2015

Wouldn't it be easier to use the @media print CSS directive instead of having separate files ?

@Henni
Copy link
Contributor Author

Henni commented Jul 6, 2015

Until now every stylesheet was limited to screen, because media="screen" was added to all link elements.
I removed this restriction, so that you are now able to use @media print in all your stylesheets.
But I like separating these styles into two files.

You can choose whatever fits best for your use case.

@PVince81
Copy link
Contributor

PVince81 commented Sep 1, 2015

What's the next step ? @jancborchardt can you review ?

@jancborchardt
Copy link
Member

@Henni so this is good to go from your view?

@Henni
Copy link
Contributor Author

Henni commented Sep 8, 2015

@jancborchardt yes it is

@jancborchardt
Copy link
Member

@Henni are the failures related then? Because it looks good for me otherwise.

@jancborchardt
Copy link
Member

👍 from me. A JS code review please @MorrisJobke @PVince81 @ChristophWurst

@Henni
Copy link
Contributor Author

Henni commented Sep 8, 2015

@jancborchardt the errors shouldn't be related.
Maybe we can let jenkins retest it.

@jancborchardt
Copy link
Member

@owncloud-bot retest this please

@jancborchardt
Copy link
Member

A JS code review please @MorrisJobke @PVince81 @ChristophWurst

Also, can’t be merged cause of failing tests @DeepDiver1975

@Henni I guess this has to wait for 9.0

@jancborchardt jancborchardt modified the milestones: 9.0-next, 8.2-current Sep 15, 2015
@DeepDiver1975
Copy link
Member

@PVince81 are all your concerns addressed? THX

@PVince81
Copy link
Contributor

Yes.

Has someone tested this with and without assets pipeline ? (I can see changes related to that)

@PVince81
Copy link
Contributor

Looks like this breaks when assets pipeline is enabled.

  1. Enable "'asset-pipeline.enabled' => true,"
  2. Log out
  3. Log in again

print-asset-pipeline

This works properly on master (854f9db)

@Henni
Copy link
Contributor Author

Henni commented Nov 16, 2015

I'll have a look

@Henni Henni self-assigned this Nov 16, 2015
@Henni
Copy link
Contributor Author

Henni commented Dec 10, 2015

I fixed the issue with the asset pipeline.
(BTW: the asset pipeline seems a bit slow 🐌 )

@nickvergessen
Copy link
Contributor

This does not touch tests, does it mean they still pass as they are, or are there no tests?

@Henni
Copy link
Contributor Author

Henni commented Dec 10, 2015

@nickvergessen good question. I didn't look for tests regarding this.
Can you give me a hint where to look for them?

@nickvergessen
Copy link
Contributor

there are none 🙊

@DeepDiver1975
Copy link
Member

rebased

@DeepDiver1975
Copy link
Member

@Henni are all issues sorted out? THX

@jancborchardt
Copy link
Member

Moving to 9.1 since we’re past feature freeze and this is not critical.

@jancborchardt jancborchardt modified the milestones: 9.1-next, 9.0-current Feb 25, 2016
@ghost ghost merged commit 0393e80 into master Mar 31, 2016
@MorrisJobke MorrisJobke deleted the printStylesheets branch March 31, 2016 20:18
@nickvergessen
Copy link
Contributor

This breaks some usages, will come up with a follow up PR

@lock
Copy link

lock bot commented Aug 6, 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 Aug 6, 2019
This pull request was closed.
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.

6 participants