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

Add support for itless base layout dashboard type #127

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

florkbr
Copy link
Contributor

@florkbr florkbr commented Nov 20, 2024

We recently updated chrome-service backend to remove widgets from the widget mapping based on feature flag (see: RedHatInsights/chrome-service-backend#716). However, those widgets still appear in the forked base template. The widgets are not rendered by the UI - however there are large chunks of whitespace in the grid (where those widgets would have been).

There are a few options to resolve this:

  1. Have the UI immediately turn around and patch the layout to remove these items. IMO this could cause undesirable bugs however (how do we know when a widget should actually be removed or there is a configuration issue?)
  2. Use the existing base template but remove each widget from the base template when the feature flag is enabled. This will cause us to make a second round trip to the server (unless cached) for the flags, and also requires us to iterate over every template variant (sm, md, etc) for the widgets (unless we add a new item to the schema).
  3. (This PR) add a new forkable landing page layout specific to itless

image

@florkbr florkbr requested a review from a team as a code owner November 20, 2024 20:39
@florkbr
Copy link
Contributor Author

florkbr commented Nov 20, 2024

Tested locally with changes to chrome-service and things appear to be working as expected. Chrome service PR will be opened by @SteveHNH

@@ -100,6 +101,12 @@ const GridLayout = ({ isLayoutLocked = false, layoutType = 'landingPage' }: { is
const addNotification = useAddNotification();
const setCurrentlyUsedWidgets = useSetAtom(currentlyUsedWidgetsAtom);
const { analytics } = useChrome();
const isITLess = useFlag('platform.widget-layout.itless');
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm
I wonder if we could pass this string as a prop from the fed-modules config as we are doing for learning resources.

Its much cleaner and we do not need a feature flag on frontend all.

Choose a reason for hiding this comment

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

That sounds great to me. I'd rather avoid having to use featureFlags if I can avoid it. It makes sense to load this from the frontend deploy file

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.

3 participants