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

Progress #1

Open
31 of 41 tasks
docwilmot opened this issue Feb 14, 2015 · 9 comments
Open
31 of 41 tasks

Progress #1

docwilmot opened this issue Feb 14, 2015 · 9 comments

Comments

@docwilmot
Copy link
Member

docwilmot commented Feb 14, 2015

Meaning ported, tests passing

  • action_example
  • ajax_example
  • batch_example
  • block_example
  • cache_example
  • contextual_links_example
  • cron_example
  • dbtng_example
  • email_example
  • entity_example
  • field_example
  • field_permission_example
  • file_example
  • filter_example
  • form_example
  • image_example
  • js_example
  • menu_example
  • node_access_example
  • node_example
  • nodeapi_example
  • page_example
  • pager_example
  • queue_example
  • render_example
  • simpletest_example
  • tabledrag_example
  • tablesort_example
  • theming_example
  • token_example
  • vertical_tabs_example

New core modules

  • config_example
  • layout_example
  • responsive_table_example
  • views_example
  • uuid_example
  • date_example
  • path_example
  • redirect_example
  • add email, link etc to field_example?
  • view_mode_example?

block_example is a direct port, but will need some changes since Layout changes some of Block's workings.

@cellear
Copy link

cellear commented Feb 14, 2015

@docwilmot++

@docwilmot
Copy link
Member Author

Changes done to block_example as per backdrop-ops/contrib#58 (comment). See branch. No tests yet.

@docwilmot
Copy link
Member Author

@cellear or @jenlampton when you get a chance, please have a look at the Backdropification of block_example (both the initial port and the branch with some proposed changes ) and action_example.

These two needed drastic changes (blocks are very different in BD, and there is no Trigger module).

The Examples were kind of integrated into the API site in Drupal as official examples and we still have references to them in BD API in a few places too; I think it would be great if you guys could give me a review before people start thinking that my port is also official.

And if they are up to scratch can you gimme a thought on how (and if) to start

config_example
layout_example @quicksketch already made suggestion re those
responsive_table_example
views_example

Thanks.

@docwilmot
Copy link
Member Author

@quicksketch @jenlampton
Sorry for the bump, but trying to finalize my ports before releasing and

The Examples were kind of integrated into the API site in Drupal as official examples and we still have references to them in BD API in a few places too; I think it would be great if you guys could give me a review before people start thinking that my port is also official.

Thanks

@quicksketch
Copy link
Member

I've done a little bit of review on the Blocks example. I'll take a look at action_example next.

how to start responsive_table_example

Responsive tables are super simple, but I think they'd be a good candidate for an example as well. In order to make a table responsive, the only thing you need to do is add classes to header cells. Two classes are supported: priority-medium and priority-low. If these classes are present, theme_table() will automatically add the responsive table JavaScript library. I would make an example that matches the tablesort_example.module, as it provides a good starting point.

views_example

Hoo boy. This could go on for a while. A views example should probably provide:

  • A sample filter, field, sort order, and contextual filter (argument) using just hook_views_data() and existing classes.
  • Sample plugins of all the above.
  • A sample display style
  • A Views pager plugin
  • A Views display type (e.g. feed, block, page)
  • A Views access plugin
  • Possibly a sample Views wizard (the "starter" form you get when creating a view)

That's going to be a ton of work. 9/10 times though, the only thing people need to do is expose a table to Views. Most of the time, they don't even need to write any custom handlers, they can just use the handlers provided by Views (e.g. views_handler_field_numeric, views_handler_field_boolean, etc.) I'd probably start there.

config_example

Config examples are a little hard to provide without a use-case. There are two general ways of exposing config:

  • A simple settings config file (most common)
  • A "group" of settings config files (e.g. views, fields, image styles, layouts, or anything that has multiple instances)

Both of these have examples in our current hook_config_info() documentation. It'd be trivial to do a simple config file + a config form. But doing the multiple instances example will need a sample that makes sense and a UI for adding/deleting instances.

Besides the basics of config, we could really use more explicit documentation on the _config_static: true property that can be in config files. Some configuration like views and image styles can also be reverted back to it's default state see image_default_style_revert(), that would also be a useful tutorial.

@docwilmot
Copy link
Member Author

Thanks again

@docwilmot
Copy link
Member Author

I've updated all examples and tests to 1.7.0 compatibility. Added a few more potential examples to the checklist above. Anyone feel like writing new examples for these, feel free to have a go.

@docwilmot
Copy link
Member Author

We need a layout_example.module, considering how significant layout module is to Backdrop. At least with the layout hooks and hook_layout_info(). It'll probably be quite a simple example but I think it would be ideal to have. We also probably also need to look at the list in the original post of additional example modules that were suggested to see if we could finally build some of those. We have also added a significant number of new modules to core since that post was last updated. Are there any other examples that we should be considering? @kiamlaluno do you think you would have the time to create a few such examples from scratch?

@avpaderno
Copy link
Member

@docwilmot I can, but not in the next 15-20 days.

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

No branches or pull requests

4 participants