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

[4.x] Workflow Featured #37561

Closed
wants to merge 3 commits into from
Closed

Conversation

brianteeman
Copy link
Contributor

This pr checks if workflows is enable and if it is changes the "featured status" to not display the Toggle message which is incorrect as it is disabled

Pull Request for Issue #34502 .

Expected result AFTER applying this Pull Request

image

Documentation Changes Required

This pr checks if workflows is enable and if it is changes the "featured status" to not display the Toggle message which is incorrect as it is disabled
@Kostelano
Copy link
Contributor

I have tested this item ✅ successfully on b5d2fa7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37561.

@Kostelano
Copy link
Contributor

Works as it should.

I note that the problem is solved for favorites, but a similar problem for the state of the publication. With the workflow enabled, there is still a line telling you to click to toggle, but there is no clickability in the workflow for these icons.

Screenshot_1

@brianteeman
Copy link
Contributor Author

please create a neew issue for that

@Quy
Copy link
Contributor

Quy commented Apr 16, 2022

I have tested this item ✅ successfully on b5d2fa7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37561.

@Quy
Copy link
Contributor

Quy commented Apr 16, 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37561.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Apr 16, 2022
$this->addState(1, 'unfeatured', 'icon-color-featured icon-star',
Text::_('JGLOBAL_TOGGLE_FEATURED'), ['tip_title' => Text::_('JFEATURED')]
);
$workflow_featured = Factory::getApplication()->bootComponent('com_content')->isFunctionalityUsed('core.featured', 'com_content.article');
Copy link
Member

Choose a reason for hiding this comment

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

Is this button only used on com_content? If not, then we shouldn't add here a hard dependency to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

workflow only works on com-content

Copy link
Member

Choose a reason for hiding this comment

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

Then you need to move the button to com_content. The libraries classes shouldn't have a hard dependency to a specific extension.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good luck with that

Copy link
Member

Choose a reason for hiding this comment

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

Ok, had a look how the button is used. As an instance is directly created in the com_content component you can pass the component reference in the constructor of the button and use that one. If it is not set, do the fallback to com_content.

Copy link
Member

Choose a reason for hiding this comment

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

workflow only works on com-content

Currently yes, but this is to be changed sooner or later so it works for other components, too.

@laoneo laoneo added the Updates Requested Indicates that this pull request needs an update from the author and should not be tested. label Apr 19, 2022
@laoneo laoneo self-assigned this Apr 20, 2022
@laoneo laoneo removed RTC This Pull Request is Ready To Commit Updates Requested Indicates that this pull request needs an update from the author and should not be tested. labels Apr 20, 2022
@laoneo
Copy link
Member

laoneo commented Apr 20, 2022

Back to pending


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/37561.

@laoneo
Copy link
Member

laoneo commented Apr 20, 2022

@brianteeman do you have any intention to pass the component to the button?

@brianteeman
Copy link
Contributor Author

no

@laoneo
Copy link
Member

laoneo commented Apr 20, 2022

Ok, then I'm closing this one because of the reasons stated above and will reopen the issue. Thanks for your understanding.

@laoneo laoneo closed this Apr 20, 2022
@brianteeman
Copy link
Contributor Author

in another year perhaps someone will look at it again

@brianteeman brianteeman deleted the featured_button branch April 20, 2022 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants