Merge Request #58
-
Reassigned to @mfdeveloper
-
Estamos utilizando essa nomenclatura de prefixar atributos privados com "_" em outros componentes do projeto? Caso contrário, talvez seja importante padronizar
-
Este seletor possui exatamente a mesma regra css que #profile-image-container? Se sim, eles deveriam ser agrupados em uma mesma declaração, ou utilizado o
@extend
do sass para herança. -
Utilize o seletor
&
para referenciar o pai. È uma boa prática de uso para seletores do tipo:hover, :after, :focus
.Observe a documentação em: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#parent-selector
-
Utilizar o prefixo
-webkit
somente parafont-smoothing
não funciona no Firefox por exemplo. Estes seletores CSS3 que possuem prefixos de browsers, estamos utilizando como padrão no projeto a criação de um @mixin dentro do arquivo_mixins.scss
, contendo as diversas formas e seus prefixos de regras CSS3. Após isso, basta incluir de forma explicita com@import "caminho/mixin"
e utilizar o mixin dentro do seu seletor!! -
Crie variáveis para estes valores
-
Utilize variáveis para esse valor de
width
também -
Acesse o
$uibModal
diretamente como uma propriedade. Algo como:helper.component.$uibModal
. Para isso, o atributo precisa ser público, ou possuir umget/set
através de Acessors do typescript.Documentação: https://www.typescriptlang.org/docs/handbook/classes.html
-
Esse TODO foi realizado? Senão, talvez seja interessante adicionar um comentário neste MR explicando o que falta ser feito, para criarmos uma issue para essa modificação, se de fato for necessário :)
-
È interessante que esses valores de
width
,height
,top
e etc estejam em variáveis no topo do arquivo.scss
-
Pq este seletor
.crop-area
está repetido? -
Realize um git rebase com o branch
[master]
para dirimir os conflitos! -
Added 42 new commits:
- 8784fe3c - Ticket #116: Better display of recent activities
- 1e4736a4 - added events-hub service
- b3953cbd - improving adding a base interface EventsHubKnownEventNames
- 332c24ec - added changes to allow pass string[] or EventsHubKnownEventNames to EventsHubService constructor
- 328a7a82 - some small refactoring on class naming and changed to allow EVENTS_HUB_KNOW_EVEN…
- fb1e923a - Merge branch 'events-hub' into 'master'
- 3d2172f3 - Adds account register module
- bc91225e - Refactor of the account register component to uses service and restangular instead.
- 42443554 - Fixing registration - it is working now
- 503976b5 - add redirect to home in case of succeded signup
- e10ddb2a - Added notification when user is created
- 716c2a26 - Added welcome message for translation on signup
- 74b67520 - Refactory html template + new environment service property
- 64b0a116 - Added environment fields and ngMessages form validation
- 4c25e839 - Added the ng.ui.bootstrap typescript definitions
- 015b68e2 - Added the modal to show environment terms of use text
- 224b593d - Added module 'angular-password' to check password confir match
- a4dac9ec - Added unit tests and minor refactories
- b4a0a739 - Fix rebase with master adjusts
- 64000ab5 - Merge branch 'register_page' into 'master'
- 26ff5335 - Change txt navbar menuitem from 'Novo Artigo' to 'Novo post' on pt.json
- d3bba43c - Ticket #118: Profile images block
- 6596b7af - adding scrap activity in profile timeline
- e80a93b4 - change scrap timeline visualization
- de08c0f6 - Merge branch 'add_scrap_in_timeline' into 'master'
- 7309dec7 - Add button to join in community
- f3cb9503 - Merge branch 'join-community' into 'master'
- 4d167676 - Add component to display tasks in menu
- 917544be - Add component to list tasks
- 07f15849 - Add accept/reject buttons to task list
- 45183e9d - Add tests to task components
- 118eeb9d - List roles when accept add member tasks
- 0354c769 - Accept parameters when accept/reject tasks
- 7205a81d - Emit and subscribe to events for task accept/reject
- 917a672d - Translate tasks messages
- 1adb5479 - Use .checkbox-nice in accept member task
- 6fca41b5 - Refactor methods to close task
- d6d5bae0 - Create interface for AddMemberTask
- a1375e04 - Merge branch 'tasks' into 'master'
- 07858dff - Initial implementation
- ccf7dc63 - Added upload image to person service
- c132a4a9 - Upload image initial and tests
-
mentioned in commit 71d22bf6b7875e5a4e6242669ffdceca4f2fb2a9
-
Este merge request foi aceito, mas necessita das seguintes melhorias/ajustes:
O botão de Upload photo que está sendo exibido no
:hover
seu container, está com a exibição intermitente. A depender do tamanho da imagem contida no blocoprofile-image
, o:hover
funciona de forma correta ou não.Ajustes de responsividade. Talvez seja interessante avaliar se este elemento HTML (Exibido ao passar o mouse) é realmente a melhor forma
Refatorar os arquivos
.sass
envolvidosPode depender das definições dos itens 1 e 2
Exibir feedback para o usuário quando um erro ocorrer no upload da imagem (tamanho excedido, formato inválido, erro no servidor ao requisitar a API e etc...)
Verificar permissões: Não exibir o botão de upload ao acessar o profile de um outro usuário
Importante criar uma outra issue contendo estes ajustes
52 | + templateUrl: 'app/profile/image/profile-image-editor.html', | |
53 | + controller: ProfileImageEditorComponent, | |
54 | + controllerAs: 'ctrl', | |
55 | + scope: this.$scope, | |
56 | + bindToController: true, | |
57 | + backdrop: 'static', | |
58 | + resolve: { | |
59 | + picFile: this.picFile, | |
60 | + profile: this.profile, | |
61 | + personService: this.personService | |
62 | + } | |
63 | + }); | |
64 | + } | |
65 | + } | |
66 | + | |
67 | + private _showCamera: boolean = false; | |
1 |
|
5 | 5 | background-clip: padding-box; |
6 | 6 | margin-bottom: 15px; |
7 | 7 | } |
8 | + | |
9 | +.profile-image-wrap { | |
10 | + display: inline; | |
1 |
|
39 | +.select-photo-container { | |
40 | + //overflow: hidden; | |
41 | + position: absolute; | |
42 | + z-index: -1; | |
43 | + background: #000; | |
44 | + background: rgba(0, 0, 0, .6); | |
45 | + background: linear-gradient(transparent, rgba(0, 0, 0, .6) 70%, rgba(0, 0, 0, .6) 100%); | |
46 | + transition: top .13s ease-out; | |
47 | +} | |
48 | + | |
49 | +#upload-container { | |
50 | + position: relative; | |
51 | + text-decoration: none; | |
52 | +} | |
53 | + | |
54 | +.upload-container a:hover { | |
1 |
|
44 | + background: rgba(0, 0, 0, .6); | |
45 | + background: linear-gradient(transparent, rgba(0, 0, 0, .6) 70%, rgba(0, 0, 0, .6) 100%); | |
46 | + transition: top .13s ease-out; | |
47 | +} | |
48 | + | |
49 | +#upload-container { | |
50 | + position: relative; | |
51 | + text-decoration: none; | |
52 | +} | |
53 | + | |
54 | +.upload-container a:hover { | |
55 | + text-decoration: none; | |
56 | +} | |
57 | + | |
58 | +.upload-button { | |
59 | + -webkit-font-smoothing: antialiased; | |
1 |
|
61 | + //word-wrap: break-word; | |
62 | +} | |
63 | + | |
64 | +.upload-container { | |
65 | + color:#fff; | |
66 | + display: block; | |
67 | + overflow: hidden; | |
68 | + position: relative; | |
69 | + text-align: left; | |
70 | + min-width: 89px; | |
71 | +} | |
72 | + | |
73 | +.cropArea { | |
74 | + background: #E4E4E4; | |
75 | + overflow: hidden; | |
76 | + width:300px; | |
1 |
|
75 | + overflow: hidden; | |
76 | + width:300px; | |
77 | + height:150px; | |
78 | +} | |
79 | + | |
80 | +.crop-area { | |
81 | + display: none; | |
82 | +} | |
83 | + | |
84 | +form .progress { | |
85 | + line-height: 15px; | |
86 | +} | |
87 | + | |
88 | +.progress { | |
89 | + display: inline-block; | |
90 | + width: 100px; | |
1 |
|
29 | + let properties = { profile: { custom_footer: "footer" } }; | |
30 | + let cls = createClass({ | |
31 | + template: htmlTemplate, | |
32 | + directives: [ProfileImageComponent], | |
33 | + properties: properties, | |
34 | + providers: [ | |
35 | + helpers.createProviderToValue("PersonService", personService), | |
36 | + helpers.createProviderToValue("$uibModal", helpers.mocks.$modal), | |
37 | + helpers.createProviderToValue("$scope", scope) | |
38 | + ] | |
39 | + }); | |
40 | + helper = new ComponentTestHelper<ProfileImageComponent>(cls, done); | |
41 | + }); | |
42 | + | |
43 | + it("set modal instance when select files modal", () => { | |
44 | + helper.component['$uibModal'].open = jasmine.createSpy("open"); | |
1 |
|
28 | 28 | p.catch(this.getHandleErrorFunction<noosfero.RestResult<any>>(deferred)); |
29 | 29 | return deferred.promise; |
30 | 30 | } |
31 | + | |
32 | + uploadImage(profile: noosfero.Profile, base64_image_json: any) { | |
33 | + let headers = { 'Content-Type': 'application/json' }; | |
34 | + let deferred = this.$q.defer<noosfero.RestResult<noosfero.Profile>>(); | |
35 | + // TODO dynamically copy the selected attributes to update | |
1 |
|
1 | +.profile-info .upload-camera-container { | |
2 | + top: 55%; | |
3 | + left: 39px; | |
4 | +} | |
5 | + | |
6 | +.profile-info-editable { | |
7 | + top: 51%; | |
8 | + width: 103px; | |
1 |
|
65 | + color:#fff; | |
66 | + display: block; | |
67 | + overflow: hidden; | |
68 | + position: relative; | |
69 | + text-align: left; | |
70 | + min-width: 89px; | |
71 | +} | |
72 | + | |
73 | +.cropArea { | |
74 | + background: #E4E4E4; | |
75 | + overflow: hidden; | |
76 | + width:300px; | |
77 | + height:150px; | |
78 | +} | |
79 | + | |
80 | +.crop-area { | |
1 |
|