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

useColumnBasisZero:false not applied in production builds #1035

Closed
gerardcarbo opened this issue Mar 16, 2019 · 10 comments
Closed

useColumnBasisZero:false not applied in production builds #1035

gerardcarbo opened this issue Mar 16, 2019 · 10 comments
Labels
bug needs: investigation P2 Issue that is important to resolve as soon as possible

Comments

@gerardcarbo
Copy link

gerardcarbo commented Mar 16, 2019

Bug Report

What is the expected behavior?

When FlexLayoutModule.withConfig({useColumnBasisZero: false}) is specified, fxFlex default output shoud be flex:1 1 auto

What is the current behavior?

In production builds it still produces flex: 1 1 1e-9px

What are the steps to reproduce?

Install:

https://github.com/gerardcarbo/flex-layout-test

and run:

npm build && npm start

The span where fxFlex is applied has the style:

style="flex: 1 1 1e-09px; box-sizing: border-box"

If you run:

ng serve

the same span has the style:

style="flex: 1 1 auto; box-sizing: border-box;"

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

"dependencies": {
   "@angular/animations": "~7.2.0",
   "@angular/cdk": "^7.3.4",
   "@angular/common": "~7.2.0",
   "@angular/compiler": "~7.2.0",
   "@angular/core": "~7.2.0",
   "@angular/flex-layout": "^7.0.0-beta.23",
   "@angular/forms": "~7.2.0",
   "@angular/platform-browser": "~7.2.0",
   "@angular/platform-browser-dynamic": "~7.2.0",
   "@angular/router": "~7.2.0",
   "core-js": "^2.5.4",
   "http-server": "^0.11.1",
   "rxjs": "~6.3.3",
   "tslib": "^1.9.0",
   "zone.js": "~0.8.26"
 },
 "devDependencies": {
   "@angular-devkit/build-angular": "~0.13.0",
   "@angular/cli": "~7.3.0",
   "@angular/compiler-cli": "~7.2.0",
   "@angular/language-service": "~7.2.0",
   "@types/node": "~8.9.4",
   "@types/jasmine": "~2.8.8",
   "@types/jasminewd2": "~2.0.3",
   "codelyzer": "~4.5.0",
   "jasmine-core": "~2.99.1",
   "jasmine-spec-reporter": "~4.2.1",
   "karma": "~3.1.1",
   "karma-chrome-launcher": "~2.2.0",
   "karma-coverage-istanbul-reporter": "~2.0.1",
   "karma-jasmine": "~1.1.2",
   "karma-jasmine-html-reporter": "^0.2.2",
   "protractor": "~5.4.0",
   "ts-node": "~7.0.0",
   "tslint": "~5.11.0",
   "typescript": "~3.2.2"
 }

Is there anything else we should know?

To generate the test I just ran ng new, configured --prod flag and added the fxFlex to the span after installing @angular/flex-layout module

@CaerusKaru
Copy link
Member

In both cases, using latest version of Flex Layout, I'm getting flex: 1 1 auto, which is the intended behavior. I'm closing this issue, but if another demo is provided we can reopen.

@gerardcarbo
Copy link
Author

I've published the output of the production build (--prod) of the provided sample using ngh in:

https://gerardcarbo.github.io/flex-layout-test/

As you can see, using the latest @angular/flex-layou 7.0.0-beta.23, it sets flex: 1 1 1e-09px to the span:

image

@gerardcarbo
Copy link
Author

gerardcarbo commented Mar 18, 2019

I can not provide you a stackblitz demo because the problem is in the production build (ng build --prod) but I have rechecked in a clean ubuntu instalation and you can reproduce the bug with:

sudo npm install -g npx 
git clone https://github.com/gerardcarbo/flex-layout-test.git
cd flex-layout-test/
npm install
npm run build
npm run serve_build

image

@CaerusKaru CaerusKaru reopened this Mar 18, 2019
@CaerusKaru CaerusKaru added P2 Issue that is important to resolve as soon as possible bug labels Mar 18, 2019
@Yanal-Yves
Copy link

Yanal-Yves commented Mar 28, 2019

I don't know if that helps, on my app:
With 7.0.0-beta.21, I am experiencing the issue.
7.0.0-beta.20, I don't have the issue but my app layout is a mess.
With 7.0.0-beta.19 I don't have the issue.

@Ghostbird
Copy link

Issue still exists in 7.0.0-beta.24

@Cowlephant
Copy link

Experiencing this issue as well exactly as described, not been able to successfully reproduce it outside of my production codebase.

@christurnbull
Copy link

The problem only occurs when building using AOT
(tested with: ng-core v7.2.15, ng-cli v7.3.9 , flex-layout 7.0.0-beta.24)

This workaround fixed it with AOT for me

@CaerusKaru
Copy link
Member

If someone updates this to v9 Angular and the nightly Flex Layout builds, I'll investigate before the (planned) Tuesday release.

@CaerusKaru
Copy link
Member

No response for a year, resolving as stale. If this is still an issue with v13, we can investigate.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug needs: investigation P2 Issue that is important to resolve as soon as possible
Projects
None yet
Development

No branches or pull requests

6 participants