-
Notifications
You must be signed in to change notification settings - Fork 1
Adding published flag and post categories #433
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
base: develop
Are you sure you want to change the base?
Conversation
👷 Deploy Preview for padp-staging processing.
|
✅ Deploy Preview for pss-scavenger-hunt ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for gbof-c19nyc-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for juel-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for universities-studying-slavery-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for libertos ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for juel-ancestry ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for juel-life ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
❌ Deploy Preview for registro-project failed. Why did it fail? →
|
| } | ||
| </div> | ||
| <div className='flex flex-col italic text-lg divide-y divide-secondary text-[#222222]'> | ||
| { loading && <p className='not-italic text-base'>{t('loading') || 'Loading'}...</p>} |
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 the loading key is in the i18n.json file, I don't think we need the hard-coded "Loading" label here.
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.
Oh yeah good catch, this was an impatient step to test it out quickly which I never went back and fixed. Thanks!
| className='hover:underline hover:font-semibold py-4 font-header' | ||
| href={getRelativeLocaleUrl(lang, `posts/${post._sys.filename}`)} | ||
| key={post._sys.filename} | ||
| href={getRelativeLocaleUrl(lang, `posts/${post?._sys?.filename}`)} |
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.
Interesting. Will the posts array ever contain null/undefined values?
| )) } | ||
| </div> | ||
| { cursor && ( | ||
| { showMore && !loading && ( |
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.
Do we also need to check for cursor here?
| label: 'Localize Pages', | ||
| type: 'boolean' | ||
| }, { | ||
| name: 'posts_config', |
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.
Let's document these changes in the README.
In this PR
publishflag to thepostsmodel to optionally use a draft/published workflow where posts aren't shown on the frontend until they're markedpublish;categorieslist to the posts schema which is populated from a list of values set in theconfig.jsonfile; when present it will add a dropdown menu to the posts page where viewers can select a category to filter by.Notes
pathsas well because why not, but it looks like paths hasn't yet been updated to the progressing loading thing, so it would be a few more steps to add the filtering and category stuff there.ListBoxcomponent for the dropdown since as best I could tell we don't have a simple list select component built out in ourreact-componentslibrary, but it's definitely possible that I just missed something. In the future if we do add such a component to the library, this should probably be updated to use it.