Skip to content

2903 projects list#28

Merged
sinejespersen merged 28 commits intodevelopfrom
feature/2903-projects-list
Nov 8, 2024
Merged

2903 projects list#28
sinejespersen merged 28 commits intodevelopfrom
feature/2903-projects-list

Conversation

@sinejespersen
Copy link
Copy Markdown

@sinejespersen sinejespersen commented Nov 5, 2024

Link to ticket

https://leantime.itkdev.dk/dashboard/show#/tickets/showTicket/2903

Description

  • Add patch for missing menu active trail on views
  • Add menu item for projects in view instead of as content
  • Add better exposed filters
  • Style projects view (add a bunch of twigs)

Screenshot of the result

Screenshot 2024-11-06 at 13 45 46 Screenshot 2024-11-06 at 14 24 13

@sinejespersen sinejespersen changed the title Feature/2903 projects list 2903 projects list (WIP) Nov 5, 2024
@sinejespersen sinejespersen force-pushed the feature/2903-projects-list branch from 43915be to da059d4 Compare November 6, 2024 13:50
@sinejespersen sinejespersen marked this pull request as ready for review November 6, 2024 13:53
@sinejespersen sinejespersen changed the title 2903 projects list (WIP) 2903 projects list Nov 6, 2024
Copy link
Copy Markdown
Contributor

@rimi-itk rimi-itk left a comment

Choose a reason for hiding this comment

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

Looks good. Some comments and suggestions added.

Comment thread docs/Development.md
```

## Delvelopment command line incantations
## Development command line incantations
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉

Comment on lines +16 to +17
This ensures that, if clean URLs are off, the 'q' is added first,
as a hidden form element, so that it shows up first in the POST URL.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are you sure? If you POST you don't add anything to the URL. Do you mean GET? You should always use GET to get stuff (Drupal breaks this rule in multiple places).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I am not sure. I copy pasted this solely to add the grid classes to <form.... should I change the comment to GET?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can't (better) exposed filters add the css class names? And make sure that you GET?

Comment thread web/themes/custom/itkdev/itkdev_project_theme/templates/views-view.html.twig Outdated
Sine Jespersen and others added 4 commits November 7, 2024 10:24
<a href="/node/add/project" class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="node/add/project">
{% set path = path('node.add', {node_type: 'project'}) %}

<a href={{ path }} class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="node/add/project">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the data-drupal-link-system-path attribute used for? Should it be set using path?

Suggested change
<a href={{ path }} class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="node/add/project">
<a href={{ path }} class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="{{ path }}">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<a href={{ path }} class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="node/add/project">
<a href="{{ path }}" class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center">

}

/* This css class is added on the projects view (admin/structure/views/view/projects) */
.projects-view {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

image

This looks as so, and will change in a later pr

<a href="/node/add/project" class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="node/add/project">
{% set path = path('node.add', {node_type: 'project'}) %}

<a href={{ path }} class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="node/add/project">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
<a href={{ path }} class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center" data-drupal-link-system-path="node/add/project">
<a href="{{ path }}" class="font-thin bg-green-700 hover:bg-green-600 text-white py-2 px-4 rounded inline-flex items-center">

@sinejespersen sinejespersen merged commit a7b12df into develop Nov 8, 2024
@sinejespersen sinejespersen deleted the feature/2903-projects-list branch November 8, 2024 12:50
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.

2 participants