docbrown/cypress
Jeremy Friesen 07983e38be
Adjusting conditional create post rendering (#17132)
* Revert "conditionally render create post button for admins #16490 (#16606)"

This reverts commit 1cb45995cb.

* Adding conditional create post rendering

This pull request does two things:

- Reverts the forem/forem#16606
- Replaces the conditional rendering with the approach from forem/forem#17076

What to consider:

- How does this impact Cumulative Layout Shift (CLS).  Prior to this
  commit, we didn't "flicker" the "Create Post" button into view if the
  site didn't have the conditional.
- In reverting forem/forem#16606 we remove a dependency on Turbo.
- We reduce one network call, relying instead on the async_info to carry
  the visible/hidden logic.

If the "flicker" is a problem we could add a conditional in the page for
if the site has enabled that feature.  However, that's a place holder as
we're looking at possible other reasons for allowing/disabling the
create a post.

This is a non-blocking PR, as in we can merge or not merge this and
proceed with what we have.  Instead the main goal is to "unify" our approach.

* Update cypress/integration/seededFlows/policyFlows/limitPostCreationToAdmins.spec.js

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Leveraging change from forem/forem#17143

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-04-07 09:11:37 -04:00
..
fixtures Rework user subscription liquid tag to avoid errors (#16460) 2022-02-15 09:14:03 +00:00
integration Adjusting conditional create post rendering (#17132) 2022-04-07 09:11:37 -04:00
plugins Added support for running E2E tests without seeded data (#14285) 2021-07-22 08:45:37 -04:00
support Update color picker input specs (#16834) 2022-03-09 14:25:22 +00:00
util ✂✂✂ Remove Connect (#14734) 2021-11-18 08:21:00 -06:00
.eslintrc.js Bump eslint from 7.32.0 to 8.6.0 (#15926) 2022-01-05 13:47:40 -05:00
jsconfig.json Enabled Intellisense for the Cypress API (#14970) 2021-10-06 16:36:11 -04:00