-
Notifications
You must be signed in to change notification settings - Fork 76
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
basic landing page #3470
basic landing page #3470
Conversation
Thanks, yeah, I think this looks good 👍, enough to start discussions about what should be there :) Still, when you have time, it might make sense to hide/remove the filter & pagination bits and add a section card with text, whether lorem ipsum or copied from https://galaxy.ansible.com/, because it's more likely we'll only have static content here now. (And maybe add a screenshot to the PR description :).) Then, to get this ready for actually being the landing page .. it might or might not get its own menu item .. but clicking the top left logo would go to And it's still not a landing page if it's not the default page .. which is always the one with That should get us to the state where this is the landing page everywhere, if we need this to be different per mode, |
632b6f0
to
5587b0b
Compare
The changes look good 👍. But the cards now take up all horizontal space instead of going side by side... --- a/src/components/cards/landing-page-card.tsx
+++ b/src/components/cards/landing-page-card.tsx
@@ -8,13 +8,14 @@ interface IProps {
export const LandingPageCard = ({ title, body }: IProps) => {
return (
- <React.Fragment>
- <Card className='landing-page-card' style={{ marginBottom: '20px' }}>
+ <Card
+ className='landing-page-card'
+ style={{ margin: '0 0 24px 24px', flex: '30%' }}
+ >
<CardHeader>
<CardTitle>{title}</CardTitle>
</CardHeader>
<CardBody>{body}</CardBody>
</Card>
- </React.Fragment>
);
};
--- a/src/containers/landing/landing-page.tsx
+++ b/src/containers/landing/landing-page.tsx
@@ -61,6 +35,14 @@ export class LandingPage extends React.Component<RouteProps, IState> {
></AlertList>
<BaseHeader title={t`Home`} />
<Main>
+ <div
+ style={{
+ display: 'flex',
+ flexWrap: 'wrap',
+ alignContent: 'flex-start',
+ marginLeft: '-24px',
+ }}
+ >
<LandingPageCard
title={t`Lorem Ipsum`}
body={t`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam nibh odio, semper non ex vitae, semper convallis tellus. Praesent et ipsum erat. Praesent hendrerit urna eget mattis vestibulum. Maecenas dictum orci vitae nisl sagittis laoreet id et mauris. Sed pharetra accumsan nibh a viverra. Duis tincidunt eros at maximus sodales. Fusce gravida tellus ligula eu posuere lorem placerat ut.`}
@@ -77,6 +59,7 @@ export class LandingPage extends React.Component<RouteProps, IState> {
title={t`Lorem Ipsum`}
body={t`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam nibh odio, semper non ex vitae, semper convallis tellus. Praesent et ipsum erat. Praesent hendrerit urna eget mattis vestibulum. Maecenas dictum orci vitae nisl sagittis laoreet id et mauris. Sed pharetra accumsan nibh a viverra. Duis tincidunt eros at maximus sodales. Fusce gravida tellus ligula eu posuere lorem placerat ut.`}
/>
+ </div>
</Main>
</React.Fragment>
); And you may want to clean up the state logic in LandingPage a bit more .. Oh and can you also change After that, the only remaining thing will be adding a redirect to collections when not running in community mode, we'll need to add a feature flag to enable the landing page. (similar to ansible/galaxy_ng#1669) |
5587b0b
to
d5ee197
Compare
Looks great! :) The only visual change I'd suggest is moving the "Welcome to Beta Galaxy" text to replace the "Home" title. Second thing, localization.. most of it is 👍 , but we should not be splitting strings in the middle of sentences, Otherwise I think this is ready except for the community vs standalone mode logic.. diff --git a/src/containers/landing/landing-page.tsx b/src/containers/landing/landing-page.tsx
index e63ba73e..64ecb03c 100644
--- a/src/containers/landing/landing-page.tsx
+++ b/src/containers/landing/landing-page.tsx
@@ -10,10 +10,12 @@ import {
closeAlertMixin,
} from 'src/components';
import { AppContext } from 'src/loaders/app-context';
+import { Paths, formatPath } from 'src/paths';
import { RouteProps, withRouter } from 'src/utilities';
interface IState {
alerts: AlertType[];
+ redirect: boolean;
}
export class LandingPage extends React.Component<RouteProps, IState> {
@@ -22,11 +24,24 @@ export class LandingPage extends React.Component<RouteProps, IState> {
this.state = {
alerts: [],
+ redirect: false,
};
}
+ componentDidMount() {
+ const { ai_deny_index } = this.context.featureFlags;
+ if (!ai_deny_index) {
+ this.setState({ redirect: true });
+ }
+ }
+
render() {
- const { alerts } = this.state;
+ const { alerts, redirect } = this.state;
+
+ if (redirect) {
+ setTimeout(() => this.props.navigate(formatPath(Paths.collections)));
+ return null;
+ }
return (
<React.Fragment> |
d5ee197
to
1121f6a
Compare
5c5eec9
to
c623da8
Compare
Translations look good now, Just the rediret above, and we need to fix the EE test failure ... looks like the redirect happens after the test clicks the EE menu item, but before it finishes loading the EE screen, so...
I think this should help.. https://reactrouter.com/en/main/start/overview#pending-navigation-ui |
19aa52e
to
b5028a7
Compare
<p> | ||
<Trans> | ||
Use the{' '} | ||
<a href='https://galaxy.ansible.com/search?deprecated=false&keywords=&order_by=-relevance'> |
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, we'll need to update the Search page link to link to the new galaxy Search page, not the old one...
can you use a Link to Paths.collections here?
b5028a7
to
354b86b
Compare
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
Issue: AAH-2172
just small nitpicks, other than LGTM 👍 :) |
Issue: AAH-2172
This work is the first version of the Beta Galaxy landing page dashboard with footer. The design follows and adds to the mockups created by Anastasia Ratti.
The 'Cookie preferences' link on the footer (seen on redhat.com) is NOT included in this pr.
Screenshots
Body:
Footer: