-
Notifications
You must be signed in to change notification settings - Fork 194
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
Add document to collection by slug #8254
Conversation
1bbd674
to
f6585bb
Compare
b6d0cbd
to
3bc9433
Compare
38da916
to
bdbdde4
Compare
Looks great from the screenshots. Be good to connect. |
Content update. Remove any mention of the term "slug"
|
…llections New route, controller, and view for the new page without any content just yet. Put the content behind a preview design system flag.
Linked Add Document from Document Collection Group documents page so it takes you to search options
NOOP unless user selects option to search via title or slug. Title or slug redirects to the sceen with a search bar.
Using the scope that is used by the edition filter in the documents search - :with_title_containing to search for live documents containing the query entered by user. If query is empty then alert the user to enter a search query. Link the Add button to the existing POST create_whitehall_member in the original document collection group membership controller. This creates the membership link between the document and the collection group. Redirect to the documents page if it is new design system. The 'Add' button is a button rather than a link as discussed within the team and design because it is posting data, and Rails no longer supports links posting data via query params. We are collectively of the opinion that buttons should not be disguised as links, so instead of styling the button to look like a link, we should just use a secondary button.
If no radio button is selected, then set an alert
Deleting document groups and removing documents from groups need to be tracked
8d9f9cb
to
592b756
Compare
} | ||
|
||
.govuk-table__cell, | ||
.govuk-table__cell > * { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set all elements within govuk-table__cell
to be vertical-align: middle
we won't need the same style to be applied to the govuk-button--secondary
element, which may be a little bit more elegant.
592b756
to
c2e0233
Compare
Allowing users to add document to a document collection via searching by title or slug.
If user does not select either of the radio buttons:
So far only "Search by title or slug" works, and takes you to the search page:
If you try to search for a blank search term, you get an alert:
When there are no results:
With results, you get an 'Add' button as discussed within the team, since the button posts data and creates the document within the collection group, hence it is not a link that redirects you to another page like other use cases:
Finally, with an added document:
https://trello.com/c/FmysJ5lP/528-allow-a-user-to-add-a-whitehall-document-from-a-title-or-a-slug
Follow these steps if you are doing a Rails upgrade.