Closed (fixed)
Project:
Social Feed
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Jul 2018 at 18:29 UTC
Updated:
19 Oct 2018 at 09:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
brian.reese commentedI've gotten a start on this. Submitting a patch which does the following:
- Treats existing global configuration as defaults for new block instances (if configured)
- Adds a "Customize" option to each block that is unchecked by default. Checking this option adds fields to the block
- When the global config is empty or incomplete, the "Customize" option is disabled and the additional block fields are required
Todo:
- There are a number of settings on the global config that are used directly by preprocess functions (e.g.
Drupal::config('socialfeed.facebooksettings')->get(<setting>)) and not by the block plugin. These have been left as-is on the global config forms and are not configurable on the block. It might make sense to add fields to the block plugin and pass values to the respective theme implementations- I'm unable to test the facebook block due to https://www.drupal.org/project/socialfeed/issues/2977624
- Automated tests would be nice
Comment #3
brian.reese commentedSubmitting an updated patch. This one also adds an a new permission, 'administer social feeds', to the module.
Comment #4
brian.reese commentedComment #5
brian.reese commentedThis latest patch also addresses uncaught exceptions from the facebook sdk and other edge cases resulting from invalid feed configuration.
Comment #6
rgristroph commentedI read through this code and have also been testing it, it looks good.
Comment #8
hemangi.gokhaleThanks for the excellent work @brian.reese, I've committed the code with some minor code changes & improvement.