I played a bit with the 'Config editor' functionality and i made some improvement/fixes

ConfigEditor

  • Replaced Symfony\Component\Yaml\Dumper and Symfony\Component\Yaml\Parser with Drupal\Component\Serialization\Yaml for consistency
  • Added validation for the provided input (empty or malformed input caused errors)
  • Handled exception in form submit + logging operations
  • Minor UI changes (increased rows for the textarea for better readability, wrapped current configuration value in a collapsed details element)

ConfigsList

  • Replaced link elements with operations elements for UI consistency
  • Added destination to operations's links to redirect the user back to the filtered list after completing the edits

Note
Patch provided in #2400453: Config list search doesn't work need to be applied or the search not work

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

willzyx’s picture

willzyx’s picture

Status: Needs work » Needs review

feedbacks are welcome

pcambra’s picture

Status: Needs review » Needs work

This needs a reroll after #2400453: Config list search doesn't work got in

willzyx’s picture

Status: Needs work » Needs review
FileSize
7.79 KB

Rerolled

moshe weitzman’s picture

   public function buildForm(array $form, FormStateInterface $form_state, $config_name = '') {
-    $data = $this->config($config_name)->get();
-    if ($data === FALSE) {
+    $config = $this->config($config_name);
+
+    if ($config === FALSE || $config->isNew()) {
       drupal_set_message(t('Config !name does not exist in the system.', array('!name' => $config_name)), 'error');
       return;
     }

Indentation and braces mismatch I think.

Otherwise looks good.

willzyx’s picture

I can't see braces mismatching or coding standards issues. If you show me the problem I will fix it

moshe weitzman’s picture

Status: Needs review » Fixed

Looks like the patch is fine, it is just misleading when viewed as a diff ... Committed. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.