- Issue created by @ahmad abbad
- @ahmad-abbad opened merge request.
- Status changed to Needs review
over 1 year ago 11:35am 18 July 2023 - Status changed to Needs work
over 1 year ago 12:32pm 18 July 2023 - 🇯🇴Jordan Rajab Natshah Jordan
Thanks, Ahamd , for reporting and the MR!
The Table component needs more work for sure.
Components has (
props
andslots
)
Better not to have the property item underprops
andslots
Only in one of them.
also, switched from camel case to snake case naming format and naming convention - 🇯🇴Jordan Rajab Natshah Jordan
I understood the same logic at first. But got the idea by then.
Please, have a look at
It's Ok not to have any propsOn your time
Components without props, with a schema →More Info and FAQ about SDC
Read: Using Single Directory Components
https://www.drupal.org/docs/develop/theming-drupal/using-single-director... →
Read: F.A.Q. (Frequently Asked Questions) about SDC
https://www.drupal.org/docs/develop/theming-drupal/using-single-director... →
Read: Creating Your First Single Directory Component within Drupal
https://herchel.com/articles/creating-your-first-single-directory-compon...
Read: Single Directory Components in Drupal Core
https://www.lullabot.com/articles/getting-single-directory-components-dr...
Watch: Single Directory Components in Core: Pittsburgh 2023
Listed that in Varbase Docs 10.0.x
- Assigned to Rajab Natshah
- Status changed to Active
over 1 year ago 9:06am 21 August 2023 - 🇯🇴Jordan Rajab Natshah Jordan
Drupal
10.1.x
stable9 template on ittable.html.twig
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/themes/stab...
and thetemplate_preprocess_table
function in the following link
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/includes/th...
is sending the following{# /** * @file * Theme override to display a table. * * Available variables: * - attributes: HTML attributes to apply to the <table> tag. * - caption: A localized string for the <caption> tag. * - colgroups: Column groups. Each group contains the following properties: * - attributes: HTML attributes to apply to the <col> tag. * Note: Drupal currently supports only one table header row, see * https://www.drupal.org/node/893530 and * http://api.drupal.org/api/drupal/includes!theme.inc/function/theme_table/7#comment-5109. * - header: Table header cells. Each cell contains the following properties: * - tag: The HTML tag name to use; either 'th' or 'td'. * - attributes: HTML attributes to apply to the tag. * - content: A localized string for the title of the column. * - field: Field name (required for column sorting). * - sort: Default sort order for this column ("asc" or "desc"). * - sticky: A flag indicating whether to use a "sticky" table header. * - rows: Table rows. Each row contains the following properties: * - attributes: HTML attributes to apply to the <tr> tag. * - data: Table cells. * - no_striping: A flag indicating that the row should receive no * 'even / odd' styling. Defaults to FALSE. * - cells: Table cells of the row. Each cell contains the following keys: * - tag: The HTML tag name to use; either 'th' or 'td'. * - attributes: Any HTML attributes, such as "colspan", to apply to the * table cell. * - content: The string to display in the table cell. * - active_table_sort: A boolean indicating whether the cell is the active table sort. * - footer: Table footer rows, in the same format as the rows variable. * - empty: The message to display in an extra row if table does not have * any rows. * - no_striping: A boolean indicating that the row should receive no striping. * - header_columns: The number of columns in the header. * * @see template_preprocess_table() */ #}
Following with part work in Bootstrap Barrio
https://git.drupalcode.org/project/bootstrap_barrio/-/blob/5.5.x/bootstr...But not using any of Barrio's theme settings on table_style , hover, table_head
Having:
utility_classes
for the table
head_utility_classes
for the head of the table -
Rajab Natshah →
committed 11154090 on 2.0.x
Issue #3375232: Fix Unexpected slot that is not declared: table, caption...
-
Rajab Natshah →
committed 11154090 on 2.0.x
- 🇯🇴Jordan Rajab Natshah Jordan
Bootstrap ~5.3.0 Documentation on Tables
- Overview
- Variants
- Accented tables
- Striped rows
- Striped columns
- Hoverable rows
- Active tables
- How do the variants and accented tables work?
- Table borders
- Bordered tables
- Tables without borders
- Small tables
- Table group dividers
- Vertical alignment
- Nesting
- Table head
- Table foot
- Captions
- Responsive tables
- Breakpoint specific
- 🇯🇴Jordan Rajab Natshah Jordan
Drupal ~10.1.0 core has
no_striping
: A boolean indicating that the row should receive no striping.But using the same flag in Bootstrap Barrio. It dose not mean no striping , that the table should be bordered.
Started to follow with the Barrio school on this.
not no_striping ? 'table-striped' : 'table-bordered',
https://git.drupalcode.org/project/bootstrap_barrio/-/blob/5.5.x/templat...But as of Bootstrap ~5.3.0 , it has the following:
- Striped rows: Use
.table-striped
to add zebra-striping to any table row within the<tbody>
. - Striped columns: Use
.table-striped-columns
to add zebra-striping to any table column. - Hoverable rows: Add
.table-hover
to enable a hover state on table rows within a<tbody>
. - Bordered tables: Add
.table-bordered
for borders on all sides of the table and cells. - Tables without borders: Add
.table-borderless
for a table without borders.
and more which are listed in the last comment
- Striped rows: Use
-
Rajab Natshah →
committed f785f4fa on 2.0.x
Issue #3375232: Fix Unexpected slot that is not declared: table, caption...
-
Rajab Natshah →
committed f785f4fa on 2.0.x
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 12:02pm 5 September 2023 - Assigned to Mohammed J. Razem
- Issue was unassigned.
- Status changed to Fixed
about 1 year ago 12:15pm 5 September 2023 -
Rajab Natshah →
committed 53844f50 on 2.0.x
Issue #3375232: Fix Unexpected slot that is not declared: table, caption...
-
Rajab Natshah →
committed 53844f50 on 2.0.x
- 🇯🇴Jordan Rajab Natshah Jordan
- 🇯🇴Jordan Rajab Natshah Jordan
✅ Released varbase_components-2.0.0-alpha21 →
Automatically closed - issue fixed for 2 weeks with no activity.