Skip to content

Commit

Permalink
Fix issue that prevented to type emojis on profile names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis committed Feb 14, 2022
1 parent d46d274 commit 618cf8a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@

<Grid.RowDefinitions>

<!--Dialog content-->
<!-- Dialog content -->
<RowDefinition Height="*"/>

<!--Accept/Cancel buttons-->
<!-- Accept/Cancel buttons -->
<RowDefinition Height="Auto"/>

</Grid.RowDefinitions>

<!--Dialog content-->
<!-- Dialog content -->
<StackPanel Grid.Row="0"
Margin="20 20 20 0">

<!--Field name-->
<!-- Field name -->
<TextBlock Text="{Binding FieldName}"
Style="{StaticResource TextblockHeader}"/>

Expand All @@ -44,14 +44,14 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>

<!--Text Field-->
<!-- Text Field -->
<ucontrols:MarkedRichTextBox Grid.Column="0"
x:Name="rtxt"
Style="{StaticResource EditRichTextBox}"
depend:FormatedDocumentSourceProperty.Value="{Binding SourceDataField,Converter={conv:HtmlByteToDocumentConverter}}"
depend:EmojiSourceProperty.Value="{StaticResource emojiPalette}"/>
depend:EmojiSourceProperty.Value="{Binding ElementName=emojiPalette}"/>

<!--Emoji button-->
<!-- Emoji button -->
<Button Grid.Column="1"
Style="{StaticResource IconButton}"
VerticalAlignment="Top"
Expand All @@ -69,21 +69,21 @@
AllowsTransparency="True"
IsOpen="{Binding IsMediaGalleryOpen}">
<ucontrols:EmojiPaletteControl DataContext="{Binding EmojiPalette,UpdateSourceTrigger=PropertyChanged}"
x:Name="emojiPalette"/>
x:Name="emojiPalette"/>
</Popup>
</Grid>

</Button>
</Grid>
</StackPanel>

<!--Accept/Cancel buttons-->
<!-- Accept/Cancel buttons -->
<StackPanel Grid.Row="1"
Orientation="Horizontal"
HorizontalAlignment="Right"
Margin="15">

<!--Accept button-->
<!-- Accept button -->
<Button Content="OK"
Command="{Binding UpdateFieldCommand}"
CommandParameter="{Binding ElementName=nameEditor}"
Expand All @@ -93,7 +93,7 @@
Margin="10 0 0 0"
Width="100"/>

<!--Cancel button-->
<!-- Cancel button -->
<Button Content="CANCEL"
Click="Button_Click_1"
HorizontalAlignment="Right"
Expand All @@ -102,8 +102,6 @@
Width="100"/>

</StackPanel>


</Grid>
</Border>
</local:BasePopUpControl>
37 changes: 18 additions & 19 deletions Khernet.UI/Khernet.UI.Presentation/Pages/ProfilePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@
<Border>
<Grid>
<Grid.RowDefinitions>
<!--User information-->
<!-- User information -->
<RowDefinition Height="*"/>

<!--Commit control-->
<!-- Commit control -->
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<!--User information-->
<!-- User information -->
<ScrollViewer Grid.Row="0"
VerticalScrollBarVisibility="Auto"
Focusable="False">

<Grid Margin="15"
FocusManager.IsFocusScope="True">
<Grid.RowDefinitions>
<!--Profile picture-->
<!-- Profile picture -->
<RowDefinition Height="Auto"/>

<!-- Additional user details-->
<!-- Additional user details -->
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<!--Profile picture-->
<!-- Profile picture -->
<Border Grid.Row="0"
BorderThickness="0 0 0 1">
<Border HorizontalAlignment="Center">
Expand Down Expand Up @@ -115,7 +115,7 @@
Grid.Row="1"
Margin="0 10 0 0">

<!--Name header-->
<!-- Name header -->
<TextBlock Text="Name"
Style="{StaticResource TextblockHeader}"
Margin="0 10 0 0"/>
Expand All @@ -126,15 +126,14 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>

<!--Full name-->
<!-- Full name -->
<ucontrols:MarkedRichTextBox Grid.Column="0"
x:Name="rtxt"
depend:FormatedDocumentSourceProperty.Value="{Binding User.SourceFullName,Converter={conv:HtmlByteToDocumentConverter}}"
depend:EmojiSourceProperty.Value="{StaticResource emojiPalette}"
depend:EmojiSourceProperty.Value="{Binding ElementName=emojiPalette}"
Style="{StaticResource EditRichTextBox}"/>

<!--Emoji button-->

<!-- Emoji button -->
<Button Grid.Column="1"
Style="{StaticResource IconButton}"
VerticalAlignment="Top"
Expand All @@ -152,22 +151,22 @@
AllowsTransparency="True"
IsOpen="{Binding IsEmojiGalleryOpen}">
<ucontrols:EmojiPaletteControl DataContext="{Binding EmojiPalette,UpdateSourceTrigger=PropertyChanged}"
x:Name="emojiPalette"/>
x:Name="emojiPalette"/>
</Popup>
</Grid>
</Button>
</Grid>


<!-- Group-->
<!-- Group -->
<TextBlock Text="Group"
Style="{StaticResource TextblockHeader}"
Margin="0 5 0 5"/>

<TextBox Text="{Binding User.Group,UpdateSourceTrigger=PropertyChanged}"
MaxLength="50"/>

<!-- Slogan-->
<!-- Slogan -->
<TextBlock Text="Slogan"
Style="{StaticResource TextblockHeader}"
Margin="0 15 0 5"/>
Expand All @@ -176,20 +175,20 @@
TextWrapping="Wrap"
MaxLength="106"/>

<!--Account section-->
<!-- Account section -->
<TextBlock Text="Account"
Style="{StaticResource GroupText}"
Margin="0 20 0 0"/>

<!--User name-->
<!-- User name -->
<TextBlock Text="User-name"
Style="{StaticResource TextblockHeader}"
Margin="0 10 0 0"/>

<TextBox Text="{Binding User.Username,UpdateSourceTrigger=PropertyChanged}"
Margin="0 10 0 10"/>

<!-- Token-->
<!-- Token -->
<TextBlock Text="Token"
Style="{StaticResource TextblockHeader}"
Margin="0 10 0 0"/>
Expand All @@ -202,12 +201,12 @@
</Grid>
</ScrollViewer>

<!--Commit control-->
<!-- Commit control -->
<Border Grid.Row="1"
BorderThickness="0 1 0 0"
BorderBrush="{StaticResource TextBoxBackgroundBrush}">

<!--Save button-->
<!-- Save button -->
<Button Width="150"
Margin="20"
Height="30"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,4 @@
Style="{StaticResource SubMenuItemStyle}"/>
</ContextMenu>

<ucontrols:EmojiPaletteControl x:Key="emojiPalette"
DataContext="{Binding EmojiPalette,UpdateSourceTrigger=PropertyChanged}"/>

</ResourceDictionary>

0 comments on commit 618cf8a

Please sign in to comment.