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

[Core] [Theme] Integration with Sylius platform #4000

Merged
merged 13 commits into from Feb 29, 2016

Conversation

Projects
None yet
3 participants
@pamil
Copy link
Member

commented Jan 28, 2016

Themes should be set per channel by default. Based on #4172, #4169, #4156, #4268, #4287, #4292.

@pamil pamil force-pushed the pamil:theme-bundle-integration branch from 02470f3 to 4bb9a49 Jan 28, 2016


Scenario: Unsetting a channel theme
When I unset "France" channel theme
Then any theme should not be used

This comment has been minimized.

Copy link
@michalmarcinkowski

michalmarcinkowski Jan 28, 2016

Contributor

Then none of the themes should be used?

@pamil pamil force-pushed the pamil:theme-bundle-integration branch from 4bb9a49 to 49aa3a6 Jan 28, 2016

Then that theme should be used

Scenario: Unsetting a channel theme
When I unset "France" channel theme

This comment has been minimized.

Copy link
@michalmarcinkowski

michalmarcinkowski Jan 28, 2016

Contributor

Missing Given I set theme...

This comment has been minimized.

Copy link
@pamil

pamil Jan 28, 2016

Author Member

👍

And there are "Maverick Meerkat" and "Vivid Vervet" themes defined

Scenario: Setting a theme on a channel
When I set "France" channel theme to "Maverick Meerkat"

This comment has been minimized.

Copy link
@michalmarcinkowski

michalmarcinkowski Jan 28, 2016

Contributor

When I set "Maverick Meerkat" theme on "France" channel?

@pamil pamil force-pushed the pamil:theme-bundle-integration branch from 49aa3a6 to 6d4127f Jan 28, 2016

When I set "Maverick Meerkat" theme to be used by "France" channel
And I set "Vivid Vervet" theme to be used by "Poland" channel
Then "France" channel should use "Maverick Meerkat" theme
And "Poland" channel should use "Vivid Vervet" theme

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Jan 28, 2016

Member

I think this scenario should be in separate feature, it is not about the management itself. Actor should be Visitor for this scenario too. Wdyt?

This comment has been minimized.

Copy link
@pamil

pamil Jan 28, 2016

Author Member

Good point, will change! :)

@pamil pamil force-pushed the pamil:theme-bundle-integration branch 14 times, most recently from 09259c9 to db0ce9d Feb 15, 2016

$channel = $this->channelContext->getChannel();
$themeName = $channel->getThemeName();
return $themeName;

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 16, 2016

Member

No need for that early return here.

This comment has been minimized.

Copy link
@pamil

pamil Feb 16, 2016

Author Member

True, PHPStorm messed up this during extracting.

@pamil pamil force-pushed the pamil:theme-bundle-integration branch 4 times, most recently from 23819b7 to 8c727ad Feb 16, 2016

@@ -0,0 +1,33 @@
@ui-themes

This comment has been minimized.

Copy link
@michalmarcinkowski

michalmarcinkowski Feb 16, 2016

Contributor

Should be just @theme and live inside theme folder :)

@pamil pamil force-pushed the pamil:theme-bundle-integration branch from 83b64d3 to 8b0bb4c Feb 17, 2016

@pamil pamil force-pushed the pamil:theme-bundle-integration branch 5 times, most recently from ea38652 to eaaae22 Feb 25, 2016

@pamil pamil force-pushed the pamil:theme-bundle-integration branch from 2163d5a to b282063 Feb 29, 2016

@pamil pamil changed the title [WIP] [Theme] Integration with Sylius platform [Core] [Theme] Integration with Sylius platform Feb 29, 2016

@@ -25,6 +25,9 @@
<parameter key="sylius.behat.context.setup.zone.class">Sylius\Behat\Context\Setup\ZoneContext</parameter>
<parameter key="sylius.behat.context.setup.tax.class">Sylius\Behat\Context\Setup\TaxContext</parameter>
<parameter key="sylius.behat.context.setup.order.class">Sylius\Behat\Context\Setup\OrderContext</parameter>
<parameter key="sylius.behat.context.setup.customer.class">Sylius\Behat\Context\Setup\CustomerContext</parameter>
<parameter key="sylius.behat.context.setup.addressing.class">Sylius\Behat\Context\Setup\AddressingContext</parameter>

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 29, 2016

Member

Are these relevant to this PR?

{
$channel->setTheme(null);
$this->channelRepository->add($channel);

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 29, 2016

Member

We should flush here, not add to repository again.

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 29, 2016

Member

Here and everywhere else.

@@ -141,6 +142,10 @@
<argument type="service" id="request_stack" />
</service>

<service id="sylius.theme.context.channel_based" class="%sylius.theme.context.channel_based.class%" public="false">

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 29, 2016

Member

Perhaps we move that to separate theme.xml file?

This comment has been minimized.

Copy link
@pamil

pamil Feb 29, 2016

Author Member

There's only one service related to theme bundle registered, but that's a good idea to extract checkout steps, order processors, settings schemas, etc.

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 29, 2016

Member

"There is only one service" - I said that 123 services ago. :>

/**
* @author Kamil Kokot <kamil.kokot@lakion.com>
*/
final class EmptyThemeContext implements ThemeContextInterface

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 29, 2016

Member

Extra space after implements.

return $channel->getTheme();
} catch (ChannelNotFoundException $exception) {
return null;
} catch (\Exception $exception) {

This comment has been minimized.

Copy link
@pjedrzejewski

pjedrzejewski Feb 29, 2016

Member

this gona be gud

This comment has been minimized.

Copy link
@pamil

pamil Feb 29, 2016

Author Member

🎉

pjedrzejewski added a commit that referenced this pull request Feb 29, 2016

Merge pull request #4000 from pamil/theme-bundle-integration
[Core] [Theme] Integration with Sylius platform

@pjedrzejewski pjedrzejewski merged commit 663ada4 into Sylius:master Feb 29, 2016

1 of 2 checks passed

Scrutinizer Created
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pjedrzejewski

This comment has been minimized.

Copy link
Member

commented Feb 29, 2016

Thank you Kamil! 👍

@pamil pamil deleted the pamil:theme-bundle-integration branch Feb 29, 2016

pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019

Merge pull request Sylius#4000 from pamil/theme-bundle-integration
[Core] [Theme] Integration with Sylius platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.