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

[FEATURE]: Vault page (search published brews) (alt title Archive) #3263

Merged
merged 232 commits into from
Sep 4, 2024

Conversation

5e-Cleric
Copy link
Member

@5e-Cleric 5e-Cleric commented Jan 22, 2024

This is just me trying to create the most wanted function, find published brews by title.

This PR creates a new Page, called the vault page, it also creates a new API endpoint to get files based of title, with multiple additional filters.

As per last update, has 2 separate request that are run simultaneously in first load of query, then only one of them is run with every reload. This avoids timeouts.

Added files and their functions:

  • vaultPage.jsx
  • vaultPage.less
  • vault.api.js
  • vault.navitem.jsx

Modified files:

  • homebrew.jsx: added Route for the page
  • brewItem.jsx: modified author display to show 'no authors';
  • app.js: added vault error handling
  • homepage.jsx & userpage.jsx: added nav item to vault
  • splitPane.jsx : hide arrows if prop hideMoveArrows

Changes

For a next PR

  • Turn to functional component
  • Use $search or $facet methods
  • Use splitPane component
  • Use listPage component
    • add Splitpane inside listpage
    • move query to outer page and just send the results
    • move filter and sort options to backend at least for Vault, due to pagination.

ToDo in this PR

  • Change Page size to page count (name)
  • Page count from input to select
  • Disable button programatically
  • Fix CSS for background not filling the page correctly
  • unable selection

Testing:

- [ ] Full functionality
  - [ ] Title search, both renderers
  - [ ] Author search, both renderers
  - [ ] Title & Author search, both renderers
  - [ ] All aforementioned, with v3 only
  - [ ] All aforementioned, with Legacy only
  - [ ] Testing advanced syntaxes ("word", -word, are there any more?)
- [ ] full functionality from URL directly
- [ ] Correct pagination controls
- [ ] Correct disabling of buttons
- [ ] Correct validation of inputs
- [ ] Request times under half a second

I don't know what else to test.

@5e-Cleric 5e-Cleric mentioned this pull request Jan 22, 2024
@5e-Cleric 5e-Cleric changed the title Admin page tinkering Admin fix & Archive page (search published brews) Jan 22, 2024
@5e-Cleric 5e-Cleric added the Epic label Jan 22, 2024
@5e-Cleric 5e-Cleric self-assigned this Jan 22, 2024
@5e-Cleric 5e-Cleric linked an issue Jan 22, 2024 that may be closed by this pull request
@5e-Cleric 5e-Cleric changed the title Admin fix & Archive page (search published brews) [FEATURE]: Archive page (search published brews) Jan 23, 2024
@5e-Cleric
Copy link
Member Author

5e-Cleric commented Jan 23, 2024

toDo list:

  • move from admin.api to its own
  • use listpage.jsx and brewitem.jsx
  • add filtering functions
    • renderer
    • cloned or not (-CLONE should do it)
    • excluding words?
    • views?
    • authors?
    • theme
  • implement agnostic UI
  • response brew count
  • page size query option

`performSearch` will set PageState whether `update` is true or not, so this line here is not doing anything.
Now `update` is unused; can remove that parameter.
No longer naming conflict with state and function parameters. We can go back to the shorter names
`performSearch()` and `loadTotal()` shouldn't need a separate check for valid items if `loadPage` already does it through `validateForm`
Copy link
Member

@calculuschild calculuschild left a comment

Choose a reason for hiding this comment

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

Ok, I have made all my tweaks.

Just one more set of issues I found that crash the page when trying to render an error message. Feel free to merge after fixing.

client/homebrew/pages/vaultPage/vaultPage.jsx Outdated Show resolved Hide resolved
client/homebrew/pages/vaultPage/vaultPage.jsx Outdated Show resolved Hide resolved
client/homebrew/pages/vaultPage/vaultPage.jsx Outdated Show resolved Hide resolved
@5e-Cleric
Copy link
Member Author

All fixed again

Hiding the `moveBrew` etc. properties when `this.state.showMoveArrows == false` means when the `metaData` tab turns off the arrows it crashes because now some functions are undefined.

Just using a whole separate property to avoid conflict.
@calculuschild calculuschild temporarily deployed to homebrewery-pr-3263 September 4, 2024 20:15 Inactive
@calculuschild
Copy link
Member

Gonna merge now..... Good work @5e-Cleric . This is a big one.

@calculuschild calculuschild merged commit eb05ac0 into naturalcrit:master Sep 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Search published brews
6 participants