This is a brainstorm issue about the Feeds UI. It starts with listing the requirements for the parser UI, followed by UI designs for various components of Feeds. You are welcome to comment on these designs or add new ones.

Table of contents

  1. Requirements for the parser UI
  2. CSV parser
  3. XML parser
  4. Feeds Tamper (no UI designs yet)
  5. Feeds Preview
  6. Other Feeds UI designs

Requirements for the parser UI

  • Parsers must be able to provide predefined sources

    This requirement is currently met. The syndication parser (RSS/Atom) for example provides title, content, author name, guid, url, tags and a lot of others. Not every parser has to provide predefined sources. The CSV and XML parsers provide none, but parsers that extend these may.

  • The user must be able to specify custom sources (regardless of the chosen parser)

    This is not possible at the moment. For the CSV and XML parsers all sources would be custom. The XML parser requires extra information per source (xpath value, interpret as raw xml). In D7, Feeds Tamper provided the feature for defining custom sources when using a parser with selectable sources.

  • Modules should be able to provide additional sources

    This is a feature that is probably not widely used, but I would like to keep it if possible as it could be useful in advanced use cases. I'm not sure if it is currently possible in the D8 version of Feeds (it is in the D7 version). Example: user adds a field to the feed and wants to map the contents of that field to a specific target. Then, when it creates a feed source, there will be an additional field on the feed form. All imported items will receive the value that is put in there. See also #2911491: Provide feeds type fields as mapping sources

  • The user should be able to reuse a source: map a source to multiple targets

    This is currently possible. Example: an user may want to map an URL source to two targets: a link field and GUID. It may be acceptable that custom sources cannot be reused, even though it could in the D7 version for the XML parser.

  • Sources should have machine names

    It will be easier for modules that integrate with Feeds (like Feeds Tamper) to provide features involving sources. They will use the machine name to refer to the specific source. Feeds Tamper, for example, allows to manipulate the values of sources.


CSV parser

Ideas of combining defining sources and mapping:

Defining new sources happens on the same page as the mapping. A pro is that you don't have to go back and forth between two steps to define additional sources to map. The con is that some parsers - like the XML Xpath parser - require more information per mapping source.

Two input fields per source, one for creating a new source, one for selecting an existing one. Plus a separate column for machine name.

Same idea as above. Note a preview section below the mapping page.
Source: #2443471-29: Implement configurable parsers.

Situation of the mapping page as per the patch from #2669974-31: Implement the CSV parser UI. Note the machine name being below the text field instead of in a separate column.

Ideas of having the sources list separate from the actual mapping:

This idea came from a multistep create feed form, where the sources could be defined after selecting the parser.
Source: #2443471-9: Implement configurable parsers.


XML Xpath parser

Ideas of combining defining sources and mapping:

Early idea of moving the whole table in from the D7 version of Feeds extensible parsers. Note that target and target configuration are missing in this table.

Adding a XML Xpath source is done the same way as a CSV source. The machine name will just be based on the entered Xpath value.

Ideas of having the sources list separate from the actual mapping:

This idea came from a multistep create feed form, where the sources could be defined after selecting the parser.
Source: #2443471-9: Implement configurable parsers.

An idea similar to the Views UI.


Feeds Tamper

No specific UI designs for Feeds Tamper have been made yet. There have been UI designs to add a Tamper button next to each source, but these only appear in the designs where the source definitions are separate from the mapping. See the designs for CSV and XML.


Feeds Preview

The idea is that if you supply a source file early in the process, you will get instant feedback on the effects of the configuration that you're doing. Similar to how you can get a preview in Views.

Like the Views UI

A preview section in the situation that you did not supply a file yet.

A preview section where you uploaded a file.

On the mapping form

On the top of the mapping form, there is a button to upload a file. Useful if defining sources happens on the same page as the mapping.

On the parser settings form


Source: #2443471-29: Implement configurable parsers.

At the start of the process

This idea came from a multistep create feed form. You select a fetcher and you immediately get a chance to supply a file. A pro of this approach is that Feeds could detect what parser you'll likely need.
Source: #2443471-9: Implement configurable parsers.


Other Feeds UI designs

Add feed, select preview file

When a file for preview was supplied when creating the feed type, that file used for preview can be selected when adding a feed.

Source: #2443471-29: Implement configurable parsers.

Save and add mapping

A button on the Feed type create form so one can go straight to "Mapping" after saving the feed type.


Rules processor

An idea to use the Rules module as underlying architecture, so more advanced use cases can be easier accomplished, like chaining importers and conditional import. Handy if a source needs to be imported to multiple entity types.

Source: #2443471-12: Implement configurable parsers.

Multistep form




Source: #2443471-9: Implement configurable parsers.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MegaChriz created an issue. See original summary.

thomasmurphy’s picture

I'll take people through this at Drupal South and give you some feedback.

MegaChriz’s picture

Added link to #2917928: Plan for 8.x-3.0-alpha1 release, which is the main issue that defines the goals for the 8.x-3.0-alpha1 release.