Closed (fixed)
Project:
Better Formats
Version:
7.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2014 at 13:59 UTC
Updated:
10 Feb 2016 at 02:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dragonwize commentedI have not had the time for a D8 version, nor do I know exactly when I will, so any help by those that like the features would be great.
Comment #2
ipo4ka704 commentedOk I will start. Later I will give a patch.
Comment #3
dayliotiWe (@InternetDevels team) have ported module and made a patch.
We plan to maintain this module in the future and want to get the maintainers.
Comment #4
dragonwize commentedThanks daylioti. I would like to get some reviews before committing this.
As for maintainership, since you are new to the Drupal community and not yet an approved Drupal full projects (https://drupal.org/node/1011698), it would be best for you to see this patch through and help in the issue queue to learn about the community and the module more in depth before taking on the responsibility of a top 100 module. After that I can sponsor you to get your access and become a maintainer.
Thanks again for all your hard work. I hope this can turn into and awesome future for Better Formats.
Comment #5
berdirThis is obviously quite out of date, but here's a quick review to get this started again if someone is interested in working on ths.
this is reserved for core modules, just leave it out.
File name has changed since then.
hook_permission is now a yaml file + callback for dynamic stuff, which this will need.
isFieldavble() is gone, what you want instead I think is check for FieldableEntityInterface of getClass()
This stuff will need to be updated for sure, the easiest way get the the field definition/settings is $entity->getFieldDefinition($name)->getSetting()
coding standards: missing documentation
Needs a new method now that returns which config files are edited here.
Comment #6
colanDoes this overlap with Allowed Formats at all?
Comment #7
justachris commentedYes, Allowed Formats seems to have a subset of the functionality of Better Formats. Basically the d7 version of the Better Formats module is allowed format selection + format ordering in the select box + hiding tips and help link. There's also an extra bit about updating the default format for
entities where the field has not been set yet.fields without having the set a default value first.Also there are a couple of issues in the queue for allowed formats that would provide further overlap if completed:
#2617982: Control "About text formats" link and inline text format guidelines
#2629618: Allow to hide text format help text for Text(formatted)
Comment #8
justachris commentedUpdated version of a D8 port addressing comments from #5 and changes in core since then. Should be functional with 8.0.0/8.0.1, matching functionality found in D7. The patch is off of the 7.x-1.x branch like the previous patch.
There is still plenty of testing and code updating to be done (noted a few @todo's in code). Adding some automated tests would also be helpful. Setting to Needs Review so others can look at and test this version.
Comment #9
dasjoComment #10
krlucas commentedJust a quick once-over of the patch in #8 with some very minor things. Awesome job! Hopefully I'll get to do some real testing in a bit.
Typo. "option" not "options".
It's grammatically correct for the period to be inside the parens because it's a complete sentence that started inside of them. That said I would just remove the parentheses.
We can use short array syntax now ([]) and while not an official coding standard or even a official "preference" I'm seeing it as a preference around D8. Definitely other instances.
Debug code.
Comment #11
justachris commented@krlucas thanks for reviewing the code, updated from your comments.
The discussion on the array short syntax is here: #2135291: [Policy, no patch] PHP 5.4 short array syntax coding standards for Drupal 8, not an official preference yet, but I agree we can update these here. Updated the other instances of array() in this module port since I think we should at least be consistent. There were only a dozen or two instances, so not a big impact.
I did notice a bug with this implementation when using a formatted text field in Views. If you add an Global: Text Area for "No Results Behavior" for example, you will get an error similar to:
PHP Fatal error: Call to undefined method Drupal\views_ui\Form\Ajax\ConfigHandler::getEntity() in better_formats/better_formats.module on line 37Will take a look at this soon, I'm pretty sure I know what is going on here.
Comment #12
dragonwize commentedThanks for the hard work here everyone. When it is ready mark it Reviewed and Tested and I will commit it. Or if someone is interested in continuing with support I can add maintainers.
Comment #13
justachris commentedAddressing a few things here in this port update:
Comment #15
dragonwize commentedThanks to all for the work here. I created a 8.x branch and committed what the latest patch by justAChris. Let's continue the rest of the port in separate issues.