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

Datahub: Add pagination for table component #1120

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

tkohr
Copy link
Collaborator

@tkohr tkohr commented Feb 17, 2025

Description

This PR introduces pagination to the table.component

Todos:

  • handle geo-table
  • pagination: layout and translate
  • storybook
  • tests

Screenshots

image

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Feb 17, 2025

Affected libs: feature-dataviz,
Affected apps: datahub,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Feb 19, 2025

📷 Screenshots are here!

Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!! that looks really good! I'll try this alongside with the PR from @AlitaBernachot and see if everything goes according to plan ;)

@tkohr tkohr marked this pull request as ready for review February 20, 2025 16:14
this.properties =
Array.isArray(value) && value.length ? Object.keys(value[0]) : []
this.count = value.length
export class TableComponent implements OnInit, AfterViewInit, OnChanges {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think of renaming this component DataTableComponent ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, and then I rename the TableScrollComponent back to TableComponent which it actually was in the beginning? Would that make sense to you, a TableComponent that accepts datasets and a DataTableComponent that accepts data readers?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just get rid of the table scroll component, unless it has some use still?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought to keep it temporarily for the geo-table-view.component which has various issues to work with the new TableComponent.

// export const WithWfs: StoryObj<TableComponent> = {
// loaders: [
// async () => ({
// dataset: await openDataset(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, small change, function signature has changed:

await openDataset(
 'https://www.geo2france.fr/geoserver/cr_hdf/ows',
 'wfs',
  {
  wfsFeatureType: 'accidento_hdf_L93',
 }
),
      `

@jahow jahow force-pushed the paginate-table-compoonent branch from b404f14 to 4e531b2 Compare February 21, 2025 22:04
@coveralls
Copy link

Coverage Status

coverage: 85.71% (+1.3%) from 84.386%
when pulling 4e531b2 on paginate-table-compoonent
into a73b34b on main.

Also make the footer the same size as before
@jahow jahow force-pushed the paginate-table-compoonent branch from 4e531b2 to ad9f43e Compare February 21, 2025 22:38
@jahow jahow force-pushed the paginate-table-compoonent branch from ad9f43e to cabd2ba Compare February 21, 2025 22:53
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

Successfully merging this pull request may close these issues.

4 participants