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

WIP: add option for skeleton-navigation #12

Closed
wants to merge 15 commits into from
Closed

WIP: add option for skeleton-navigation #12

wants to merge 15 commits into from

Conversation

PraveenGandhi
Copy link
Contributor

Hi @3cp ,

I feel that this is not a good idea (duplicate code in ./app-min and ./skeleton-navigation). Please suggest if there is a better way.

Thank you @jwx for your tutorials.

related to #5

questions.js Outdated Show resolved Hide resolved
import Aurelia, { RouterConfiguration/* @if shadow-dom || css-module */, StyleConfiguration }/* @endif */ } from 'aurelia';
import { MyApp } from './my-app';

Aurelia/* @if shadow-dom */.register(StyleConfiguration.shadowDOM())/* @endif *//* @if css-module */.register(StyleConfiguration.cssModulesProcessor())/* @endif */.register(RouterConfiguration).app(MyApp).start();
Copy link
Member

Choose a reason for hiding this comment

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

Yes, this file and src/resource.d.ts can be pushed down to common/ folder to avoid duplication.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think main.ext may get nested /* if exp */
please suggest.

Copy link
Member

Choose a reason for hiding this comment

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

There is another PR going to be merged too. That will clean up main.ext, then you will only need one condition on app-with-router.
Will let you know when it's merged.

skeleton-navigation/src/my-app.html Outdated Show resolved Hide resolved
text-decoration: none;
color: black;
}
a:hover {
Copy link
Member

Choose a reason for hiding this comment

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

Less file can be cleaned up to use nested class. There are few others can be merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

text-decoration: none;
color: black;
}
a:hover {
Copy link
Member

Choose a reason for hiding this comment

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

Scss file can be cleaned up to use nested class. There are few others can be merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

skeleton-navigation/src/resource.d.ts__if_typescript Outdated Show resolved Hide resolved
skeleton-navigation/src/welcome.html Outdated Show resolved Hide resolved
skeleton-navigation/src/welcome.ts Outdated Show resolved Hide resolved
@3cp
Copy link
Member

3cp commented Mar 26, 2020

Thanks very much!

Please also cleanup all the files to use 2 spaces (instead of 4) on indentation.

@3cp
Copy link
Member

3cp commented Mar 26, 2020

@jwx please help to review too.

@@ -0,0 +1,3 @@
export class About {

Copy link
Member

Choose a reason for hiding this comment

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

Maybe remove this file and make about an html-only custom element.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,48 @@
body {
Copy link
Member

Choose a reason for hiding this comment

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

If I'm not mistaken, this styling is more or less the styling I had in one of my live coding videos. If so, it should perhaps be both cleaned up and trimmed down for a skeleton.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you are right :), but I think minimal styling is fine to have it nice looking. Please share your thoughts.

Comment on lines 46 to 48
.goto-active {
background-color: lightgray;
}
Copy link
Member

Choose a reason for hiding this comment

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

This, however, should remain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think what @jwx suggested is that you can remove lots of styles and layout from the skeleton, they were only for the demonstration in his video. We can cut off, and reduce to minium, because end user just want some starting code for router, not layout and styles.

Got it, let me clean up the styling.

skeleton-navigation/src/my-app.html Outdated Show resolved Hide resolved
@@ -0,0 +1,48 @@
body {
Copy link
Member

Choose a reason for hiding this comment

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

See previous comment about styling.

@@ -0,0 +1,48 @@
body {
Copy link
Member

Choose a reason for hiding this comment

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

And again about styling.

@3cp
Copy link
Member

3cp commented Mar 27, 2020

I think what @jwx suggested is that you can remove lots of styles and layout from the skeleton, they were only for the demonstration in his video. We can cut off, and reduce to minium, because end user just want some starting code for router, not layout and styles.

@PraveenGandhi
Copy link
Contributor Author

@3cp ,

I think main.ext may get nested /* if exp */
please suggest.

@3cp
Copy link
Member

3cp commented Mar 27, 2020

@3cp ,

I think main.ext may get nested /* if exp */
please suggest.

Nested condition is supported. What's your intended usage (snippet)?

@PraveenGandhi
Copy link
Contributor Author

I think what @jwx suggested is that you can remove lots of styles and layout from the skeleton, they were only for the demonstration in his video. We can cut off, and reduce to minium, because end user just want some starting code for router, not layout and styles.

Got it, let me clean up the styling. Shall I try bootsrap4 with font-awesome5 (similar to au1 cli generated skeleton-navigation)?

@3cp
Copy link
Member

3cp commented Mar 27, 2020

Got it, let me clean up the styling. Shall I try bootsrap4 with font-awesome5 (similar to au1 cli generated skeleton-navigation)?

Pls don't add them now :-) We want to keep this repo to minimum as au2 is a moving target.

@PraveenGandhi
Copy link
Contributor Author

@3cp ,
I think main.ext may get nested /* if exp */
please suggest.

Nested condition is supported. What's your intended usage (snippet)?

As we should avoid duplication, to move main.ext to common\src ,
Is this looking fine (it generates two separate import statements from the same package)?
image

@3cp
Copy link
Member

3cp commented Mar 27, 2020

You can refactor the import into one with nested condition. But wait for the other PR, it will change that statement.

@PraveenGandhi
Copy link
Contributor Author

@3cp ,
@jwx ,

Is this styling enough for the minimal app?

nav {
background: linear-gradient(135deg, #6d50a2 0%, #ed2b88 100%);
display: flex;
}

a {
padding: 10px;
text-decoration: none;
color: black;
}
a:hover {
background-color: darkgray;
}

.goto-active {
background-color: lightgray;
}

App looks like below:

image

@3cp
Copy link
Member

3cp commented Mar 27, 2020

I guess removing gradient because other part is plain, just need an obvious active style.
But that's just me. A fancy background would not hurt either!

@3cp
Copy link
Member

3cp commented Mar 27, 2020

BTW, in html, pls remove footer, and remove container div wrapper. There is no style now, no need to keep them. @jwx what's name="main" on the <au-viewport?

@PraveenGandhi
Copy link
Contributor Author

@3cp ,
@jwx ,

Styling cleaned up.
Waiting for other PR to be merged to change main.ext

@3cp
Copy link
Member

3cp commented Mar 27, 2020

Not that fast :-)
There is still unit tests and cypress e2e tests need to be implemented for this feature.

@PraveenGandhi
Copy link
Contributor Author

Not that fast :-)
There is still unit tests and cypress e2e tests need to be implemented for this feature.

You all rock. Take your time. I know that I am just doing small and simple things as I am a typical dev and a user of Aurelia.

@3cp
Copy link
Member

3cp commented Mar 28, 2020

The other PR is merged.

@3cp
Copy link
Member

3cp commented Mar 28, 2020

Looks you got many duplicated commits.

@PraveenGandhi
Copy link
Contributor Author

Looks you got many duplicated commits.

yes, how do I remove them?

@3cp
Copy link
Member

3cp commented Mar 28, 2020

Never mind, as long as it's mergable, I can squash commits into one when merging.

@3cp
Copy link
Member

3cp commented Mar 28, 2020

Or you can create a fresh branch on our master, may need to fork a repo if you are not sure how to reset your master.

@PraveenGandhi
Copy link
Contributor Author

Never mind, as long as it's mergable, I can squash commits into one when merging.

Ok. Could you please review the files now?

@3cp
Copy link
Member

3cp commented Mar 28, 2020

The changes here looks messed up, they are still against the old master.
Please try to create another clean PR against current master head.

@PraveenGandhi
Copy link
Contributor Author

new PR is on the way

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