Skip to content

Commit

Permalink
Merge branch 'develop' into feature/532627-text-reply
Browse files Browse the repository at this point in the history
  • Loading branch information
Andre Rossi committed Nov 27, 2023
2 parents cb0323c + f20eadf commit f441506
Show file tree
Hide file tree
Showing 10 changed files with 420 additions and 205 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.0.89

- [DSInteractiveButtonMessageBubble] Fixed border radius behavior.
- [DSInteractiveListMessageBubble] Fixed border radius behavior.

## 0.0.88

- [DSApplicationJsonMessageBubble] Added support for interactive lists and buttons.
Expand Down
63 changes: 27 additions & 36 deletions lib/src/widgets/buttons/ds_menu_item.widget.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import 'package:flutter/material.dart';

import '../../enums/ds_align.enum.dart';
import '../../models/ds_message_bubble_style.model.dart';
import '../../themes/colors/ds_colors.theme.dart';
import '../../themes/texts/utils/ds_font_weights.theme.dart';
import '../texts/ds_body_text.widget.dart';
import '../../../blip_ds.dart';

class DSMenuItem extends StatelessWidget {
DSMenuItem({
Key? key,
required this.text,
required this.align,
this.showBorder = false,
this.showDivider = false,
this.onPressed,
this.fontWeight = DSFontWeights.bold,
DSMessageBubbleStyle? style,
Expand All @@ -23,7 +19,7 @@ class DSMenuItem extends StatelessWidget {

final String text;
final DSAlign align;
final bool showBorder;
final bool showDivider;
final void Function()? onPressed;
final DSMessageBubbleStyle style;
final FontWeight fontWeight;
Expand All @@ -32,36 +28,18 @@ class DSMenuItem extends StatelessWidget {
late final bool isLightBubbleBackground;

@override
Widget build(BuildContext context) {
return InkWell(
onTap: onPressed,
child: Container(
height: 57.0,
padding: const EdgeInsets.symmetric(horizontal: 16),
decoration: BoxDecoration(
border: showBorder
? Border(
bottom: BorderSide(
color: isLightBubbleBackground
? isDefaultBubbleColors
? DSColors.neutralMediumWave
: DSColors.neutralDarkCity
: isDefaultBubbleColors
? DSColors.neutralDarkRooftop
: DSColors.neutralLightSnow,
),
)
: null,
),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
Widget build(BuildContext context) => InkWell(
onTap: onPressed,
child: Column(
children: [
Flexible(
Container(
height: 57.0,
alignment: Alignment.center,
padding: const EdgeInsets.symmetric(horizontal: 16),
child: DSBodyText(
text,
fontWeight: fontWeight,
textAlign: TextAlign.center,
maxLines: 2,
color: isLightBubbleBackground
? isDefaultBubbleColors
? DSColors.primaryNight
Expand All @@ -71,9 +49,22 @@ class DSMenuItem extends StatelessWidget {
: DSColors.neutralLightSnow,
),
),
if (showDivider)
Padding(
padding: const EdgeInsets.symmetric(
vertical: 1.0,
),
child: DSDivider(
color: isLightBubbleBackground
? isDefaultBubbleColors
? DSColors.neutralMediumWave
: DSColors.neutralDarkCity
: isDefaultBubbleColors
? DSColors.neutralDarkRooftop
: DSColors.neutralLightSnow,
),
)
],
),
),
);
}
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class DSApplicationJsonMessageBubble extends StatelessWidget {
DSApplicationJsonMessageBubble({
super.key,
required this.align,
required this.borderRadius,
required this.content,
this.borderRadius = const [DSBorderRadius.all],
this.status,
this.avatarConfig = const DSMessageBubbleAvatarConfig(),
DSMessageBubbleStyle? style,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/widgets/chat/ds_document_select.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DSDocumentSelect extends StatelessWidget {
? option.label.value
: option.label.value['text'],
align: align,
showBorder: count != options.length,
showDivider: count != options.length,
onPressed: () {
if (option.label.type == DSMessageContentType.webLink) {
if (onOpenLink != null) {
Expand Down
Loading

0 comments on commit f441506

Please sign in to comment.